Commit 78efac53 authored by Chao Yu's avatar Chao Yu Committed by Jaegeuk Kim

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 d1b3e72d ("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: d1b3e72d ("f2fs: submit bio of in-place-update pages")
Signed-off-by: default avatarChao Yu <yuchao0@huawei.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 4c58ed07
...@@ -460,6 +460,10 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio) ...@@ -460,6 +460,10 @@ int f2fs_submit_page_bio(struct f2fs_io_info *fio)
bio_put(bio); bio_put(bio);
return -EFAULT; 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); bio_set_op_attrs(bio, fio->op, fio->op_flags);
if (!is_read_io(fio->op)) if (!is_read_io(fio->op))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment