* [PATCH] f2fs: fix to update F2FS_{CP_}WB_DATA count correctly
@ 2017-02-27 9:10 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2017-02-27 9:10 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, chao, Chao Yu
We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/data.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index b0a2e3faabb2..1375fef11146 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -398,7 +398,8 @@ int f2fs_submit_page_mbio(struct f2fs_io_info *fio)
if ((fio->type == DATA || fio->type == NODE) &&
fio->new_blkaddr & F2FS_IO_SIZE_MASK(sbi)) {
err = -EAGAIN;
- dec_page_count(sbi, WB_DATA_TYPE(bio_page));
+ if (!is_read)
+ dec_page_count(sbi, WB_DATA_TYPE(bio_page));
goto out_fail;
}
io->bio = __bio_alloc(sbi, fio->new_blkaddr,
--
2.8.2.295.g3f1c1d0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH] f2fs: fix to update F2FS_{CP_}WB_DATA count correctly
@ 2017-02-27 9:10 ` Chao Yu
0 siblings, 0 replies; 2+ messages in thread
From: Chao Yu @ 2017-02-27 9:10 UTC (permalink / raw)
To: jaegeuk; +Cc: chao, linux-kernel, linux-f2fs-devel
We should only account F2FS_{CP_}WB_DATA IOs for write path, fix it.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
---
fs/f2fs/data.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index b0a2e3faabb2..1375fef11146 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -398,7 +398,8 @@ int f2fs_submit_page_mbio(struct f2fs_io_info *fio)
if ((fio->type == DATA || fio->type == NODE) &&
fio->new_blkaddr & F2FS_IO_SIZE_MASK(sbi)) {
err = -EAGAIN;
- dec_page_count(sbi, WB_DATA_TYPE(bio_page));
+ if (!is_read)
+ dec_page_count(sbi, WB_DATA_TYPE(bio_page));
goto out_fail;
}
io->bio = __bio_alloc(sbi, fio->new_blkaddr,
--
2.8.2.295.g3f1c1d0
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-02-27 9:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27 9:10 [PATCH] f2fs: fix to update F2FS_{CP_}WB_DATA count correctly Chao Yu
2017-02-27 9:10 ` Chao Yu
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.