aboutsummaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorChao Yu2017-08-02 23:21:48 +0800
committerJaegeuk Kim2017-08-09 21:43:58 -0700
commitb0af6d491a6b5f5622fa91ac75f34f3640f862c4 (patch)
treed70ceb1814e1f9797566f72242141a698a727907 /fs/f2fs/super.c
parent35ee82ca133a58011e648a407d4ab13275c975d4 (diff)
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/super.c')
-rw-r--r--fs/f2fs/super.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index b84367856f8e..ca340d84f8c2 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2056,6 +2056,10 @@ try_onemore:
set_sbi_flag(sbi, SBI_POR_DOING);
spin_lock_init(&sbi->stat_lock);
+ /* init iostat info */
+ spin_lock_init(&sbi->iostat_lock);
+ sbi->iostat_enable = false;
+
for (i = 0; i < NR_PAGE_TYPE; i++) {
int n = (i == META) ? 1: NR_TEMP_TYPE;
int j;