summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/gc.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-08-02 23:21:48 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2017-08-09 21:43:58 -0700
commitb0af6d491a6b5f5622fa91ac75f34f3640f862c4 (patch)
treed70ceb1814e1f9797566f72242141a698a727907 /fs/f2fs/gc.c
parent35ee82ca133a58011e648a407d4ab13275c975d4 (diff)
downloadlinux-b0af6d491a6b5f5622fa91ac75f34f3640f862c4.tar.gz
linux-b0af6d491a6b5f5622fa91ac75f34f3640f862c4.tar.bz2
linux-b0af6d491a6b5f5622fa91ac75f34f3640f862c4.zip
f2fs: add app/fs io stat
This patch enables inner app/fs io stats and introduces below virtual fs nodes for exposing stats info: /sys/fs/f2fs/<dev>/iostat_enable /proc/fs/f2fs/<dev>/iostat_info Signed-off-by: Chao Yu <yuchao0@huawei.com> [Jaegeuk Kim: fix wrong stat assignment] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.c')
-rw-r--r--fs/f2fs/gc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c
index f57cadae1a30..620dca443b29 100644
--- a/fs/f2fs/gc.c
+++ b/fs/f2fs/gc.c
@@ -689,6 +689,8 @@ static void move_encrypted_block(struct inode *inode, block_t bidx,
fio.new_blkaddr = newaddr;
f2fs_submit_page_write(&fio);
+ f2fs_update_iostat(fio.sbi, FS_GC_DATA_IO, F2FS_BLKSIZE);
+
f2fs_update_data_blkaddr(&dn, newaddr);
set_inode_flag(inode, FI_APPEND_WRITE);
if (page->index == 0)
@@ -736,6 +738,7 @@ static void move_data_page(struct inode *inode, block_t bidx, int gc_type,
.page = page,
.encrypted_page = NULL,
.need_lock = LOCK_REQ,
+ .io_type = FS_GC_DATA_IO,
};
bool is_dirty = PageDirty(page);
int err;