summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/debug.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2017-04-18 13:27:39 +0200
committerJaegeuk Kim <jaegeuk@kernel.org>2017-04-19 20:00:45 +0200
commitd84d1cbdec6b5d9ba391079a111572197db66d54 (patch)
tree42ee95201e0ed0d2eef6a79051e02bbaaaf15f0a /fs/f2fs/debug.c
parentf2fs: unlock cp_rwsem early for IPU writes (diff)
downloadlinux-d84d1cbdec6b5d9ba391079a111572197db66d54.tar.xz
linux-d84d1cbdec6b5d9ba391079a111572197db66d54.zip
f2fs: add undiscard blocks stat
This patch adds to account undiscard blocks. Signed-off-by: Chao Yu <yuchao0@huawei.com>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r--fs/f2fs/debug.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 692beff66bf8..6102737473d4 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -69,6 +69,7 @@ static void update_general_status(struct f2fs_sb_info *sbi)
atomic_read(&SM_I(sbi)->dcc_info->issing_discard);
si->nr_discard_cmd =
atomic_read(&SM_I(sbi)->dcc_info->discard_cmd_cnt);
+ si->undiscard_blks = SM_I(sbi)->dcc_info->undiscard_blks;
}
si->total_count = (int)sbi->user_block_count / sbi->blocks_per_seg;
si->rsvd_segs = reserved_segments(sbi);
@@ -348,11 +349,11 @@ static int stat_show(struct seq_file *s, void *v)
si->ext_tree, si->zombie_tree, si->ext_node);
seq_puts(s, "\nBalancing F2FS Async:\n");
seq_printf(s, " - IO (CP: %4d, Data: %4d, Flush: (%4d %4d), "
- "Discard: (%4d %4d)) cmd: %4d\n",
+ "Discard: (%4d %4d)) cmd: %4d undiscard:%4u\n",
si->nr_wb_cp_data, si->nr_wb_data,
si->nr_flushing, si->nr_flushed,
si->nr_discarding, si->nr_discarded,
- si->nr_discard_cmd);
+ si->nr_discard_cmd, si->undiscard_blks);
seq_printf(s, " - inmem: %4d, atomic IO: %4d (Max. %4d), "
"volatile IO: %4d (Max. %4d)\n",
si->inmem_pages, si->aw_cnt, si->max_aw_cnt,