Commit 193a639f authored by Yangtao Li's avatar Yangtao Li Committed by Jaegeuk Kim

f2fs: add iostat support for flush

In this patch, it adds to account flush count.
Signed-off-by: default avatarYangtao Li <frank.li@vivo.com>
Signed-off-by: default avatarJaegeuk Kim <jaegeuk@kernel.org>
parent 7a2b15cf
......@@ -1192,6 +1192,7 @@ enum iostat_type {
/* other */
FS_DISCARD_IO, /* discard */
FS_FLUSH_IO, /* flush */
NR_IO_TYPE,
};
......
......@@ -80,6 +80,7 @@ int __maybe_unused iostat_info_seq_show(struct seq_file *seq, void *offset)
/* print other IOs */
seq_puts(seq, "[OTHER]\n");
IOSTAT_INFO_SHOW("fs discard", FS_DISCARD_IO);
IOSTAT_INFO_SHOW("fs flush", FS_FLUSH_IO);
return 0;
}
......
......@@ -506,6 +506,8 @@ static int __submit_flush_wait(struct f2fs_sb_info *sbi,
trace_f2fs_issue_flush(bdev, test_opt(sbi, NOBARRIER),
test_opt(sbi, FLUSH_MERGE), ret);
if (!ret)
f2fs_update_iostat(sbi, NULL, FS_FLUSH_IO, 0);
return ret;
}
......
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