diff options
author | Chao Yu <yuchao0@huawei.com> | 2020-04-16 13:16:56 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2020-04-17 19:17:00 +0300 |
commit | 8b83ac81f4283ae3bd05c9a7e15dca721014dd03 (patch) | |
tree | 1ce1a104615ba45fdb9df0a828f4b03d8b4182e4 /fs/f2fs/node.c | |
parent | df423399757531c20d495bf6b8b83a8dcca3565c (diff) | |
download | linux-8b83ac81f4283ae3bd05c9a7e15dca721014dd03.tar.xz |
f2fs: support read iostat
Adds to support accounting read IOs from userspace/kernel.
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index ecbd6bd14a49..4da0d8713df5 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -1300,7 +1300,13 @@ static int read_node_page(struct page *page, int op_flags) } fio.new_blkaddr = fio.old_blkaddr = ni.blk_addr; - return f2fs_submit_page_bio(&fio); + + err = f2fs_submit_page_bio(&fio); + + if (!err) + f2fs_update_iostat(sbi, FS_NODE_READ_IO, F2FS_BLKSIZE); + + return err; } /* |