summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-10-22 23:24:28 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-10-29 18:46:23 -0700
commit9204be8a482b55f71abce48baddb24c8a8f0e424 (patch)
treeb0559a17f081f0cfb4f335ae1224e5a0724cb756
parentfb363c5db4200af3eaaa1665aa2290f8a4121b24 (diff)
f2fs: fix to account IO correctly for cgroup writeback
Now, we have supported cgroup writeback, it depends on correctly IO account of specified filesystem. But in commit d1b3e72d5490 ("f2fs: submit bio of in-place-update pages"), we split write paths from f2fs_submit_page_mbio() to two: - f2fs_submit_page_bio() for IPU path - f2fs_submit_page_bio() for OPU path But still we account write IO only in f2fs_submit_page_mbio(), result in incorrect IO account, fix it by adding missing IO account in IPU path. Fixes: d1b3e72d5490 ("f2fs: submit bio of in-place-update pages") Signed-off-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
-rw-r--r--fs/f2fs/data.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/data.c b/fs/f2fs/data.c
index 49cfa4859291..326b6955bd2a 100644
--- a/fs/f2fs/data.c
+++ b/fs/f2fs/data.c
@@ -457,6 +457,10 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
bio_put(bio);
return -EFAULT;
}
+
+ if (fio->io_wbc && !is_read_io(fio->op))
+ wbc_account_io(fio->io_wbc, page, PAGE_SIZE);
+
bio_set_op_attrs(bio, fio->op, fio->op_flags);
if (!is_read_io(fio->op))