From b9a2c252071d44d4a22082611db84272be1f3b49 Mon Sep 17 00:00:00 2001 From: Changman Lee Date: Wed, 24 Dec 2014 02:16:54 +0900 Subject: f2fs: add block count by in-place-update in stat info This patch adds block count by in-place-update in stat. Signed-off-by: Changman Lee Reviewed-by: Chao Yu Signed-off-by: Jaegeuk Kim --- fs/f2fs/debug.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'fs/f2fs/debug.c') diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index 91e8f699ab30..2b6422156ea0 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c @@ -79,6 +79,8 @@ static void update_general_status(struct f2fs_sb_info *sbi) si->segment_count[i] = sbi->segment_count[i]; si->block_count[i] = sbi->block_count[i]; } + + si->inplace_count = atomic_read(&sbi->inplace_count); } /* @@ -277,6 +279,7 @@ static int stat_show(struct seq_file *s, void *v) for (j = 0; j < si->util_free; j++) seq_putc(s, '-'); seq_puts(s, "]\n\n"); + seq_printf(s, "IPU: %u blocks\n", si->inplace_count); seq_printf(s, "SSR: %u blocks in %u segments\n", si->block_count[SSR], si->segment_count[SSR]); seq_printf(s, "LFS: %u blocks in %u segments\n", @@ -331,6 +334,7 @@ int f2fs_build_stats(struct f2fs_sb_info *sbi) atomic_set(&sbi->inline_inode, 0); atomic_set(&sbi->inline_dir, 0); + atomic_set(&sbi->inplace_count, 0); mutex_lock(&f2fs_stat_mutex); list_add_tail(&si->stat_list, &f2fs_stat_list); -- cgit v1.2.3