diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-01-11 13:20:04 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2017-02-22 23:24:47 -0500 |
commit | dcc9165dbf9961cf2848af728f8be31f28a3c790 (patch) | |
tree | 4f5340b7688f04585f127119a256dc6e338d6a53 /fs/f2fs/debug.c | |
parent | 1546996348b33dc44dff829bc86fea8a8536164d (diff) |
f2fs: show # of on-going flush and discard bios
This patch adds stat information for flush and discard commands.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r-- | fs/f2fs/debug.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index f9f6b0aeba02..0ca977a94c13 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -54,6 +54,12 @@ static void update_general_status(struct f2fs_sb_info *sbi) | |||
54 | si->max_aw_cnt = atomic_read(&sbi->max_aw_cnt); | 54 | si->max_aw_cnt = atomic_read(&sbi->max_aw_cnt); |
55 | si->nr_wb_cp_data = get_pages(sbi, F2FS_WB_CP_DATA); | 55 | si->nr_wb_cp_data = get_pages(sbi, F2FS_WB_CP_DATA); |
56 | si->nr_wb_data = get_pages(sbi, F2FS_WB_DATA); | 56 | si->nr_wb_data = get_pages(sbi, F2FS_WB_DATA); |
57 | if (SM_I(sbi) && SM_I(sbi)->fcc_info) | ||
58 | si->nr_flush = | ||
59 | atomic_read(&SM_I(sbi)->fcc_info->submit_flush); | ||
60 | if (SM_I(sbi) && SM_I(sbi)->dcc_info) | ||
61 | si->nr_discard = | ||
62 | atomic_read(&SM_I(sbi)->dcc_info->submit_discard); | ||
57 | si->total_count = (int)sbi->user_block_count / sbi->blocks_per_seg; | 63 | si->total_count = (int)sbi->user_block_count / sbi->blocks_per_seg; |
58 | si->rsvd_segs = reserved_segments(sbi); | 64 | si->rsvd_segs = reserved_segments(sbi); |
59 | si->overp_segs = overprovision_segments(sbi); | 65 | si->overp_segs = overprovision_segments(sbi); |
@@ -318,8 +324,9 @@ static int stat_show(struct seq_file *s, void *v) | |||
318 | seq_printf(s, " - Inner Struct Count: tree: %d(%d), node: %d\n", | 324 | seq_printf(s, " - Inner Struct Count: tree: %d(%d), node: %d\n", |
319 | si->ext_tree, si->zombie_tree, si->ext_node); | 325 | si->ext_tree, si->zombie_tree, si->ext_node); |
320 | seq_puts(s, "\nBalancing F2FS Async:\n"); | 326 | seq_puts(s, "\nBalancing F2FS Async:\n"); |
321 | seq_printf(s, " - IO (CP: %4d, Data: %4d)\n", | 327 | seq_printf(s, " - IO (CP: %4d, Data: %4d, Flush: %4d, Discard: %4d)\n", |
322 | si->nr_wb_cp_data, si->nr_wb_data); | 328 | si->nr_wb_cp_data, si->nr_wb_data, |
329 | si->nr_flush, si->nr_discard); | ||
323 | seq_printf(s, " - inmem: %4d, atomic IO: %4d (Max. %4d)\n", | 330 | seq_printf(s, " - inmem: %4d, atomic IO: %4d (Max. %4d)\n", |
324 | si->inmem_pages, si->aw_cnt, si->max_aw_cnt); | 331 | si->inmem_pages, si->aw_cnt, si->max_aw_cnt); |
325 | seq_printf(s, " - nodes: %4d in %4d\n", | 332 | seq_printf(s, " - nodes: %4d in %4d\n", |