summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/debug.c
diff options
context:
space:
mode:
authorChao Yu <yuchao0@huawei.com>2018-09-29 18:31:28 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2018-09-30 18:33:34 -0700
commit274bd9ba39425610fdb9a6827602197a5cd27cd8 (patch)
tree9f0502bf4cbc4364a61a1553ec96c5bd0d767975 /fs/f2fs/debug.c
parentb63e7be5908cb757fc6b98fb9534dabd78b5338a (diff)
downloadlinux-274bd9ba39425610fdb9a6827602197a5cd27cd8.tar.bz2
f2fs: add to account skip count of background GC
This patch adds to account skip count of background GC, and show stat info via 'status' debugfs entry. Signed-off-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.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index da1cabbc4973..75bc62edc4c1 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -101,6 +101,8 @@ static void update_general_status(struct f2fs_sb_info *sbi)
si->avail_nids = NM_I(sbi)->available_nids;
si->alloc_nids = NM_I(sbi)->nid_cnt[PREALLOC_NID];
si->bg_gc = sbi->bg_gc;
+ si->io_skip_bggc = sbi->io_skip_bggc;
+ si->other_skip_bggc = sbi->other_skip_bggc;
si->skipped_atomic_files[BG_GC] = sbi->skipped_atomic_files[BG_GC];
si->skipped_atomic_files[FG_GC] = sbi->skipped_atomic_files[FG_GC];
si->util_free = (int)(free_user_blocks(sbi) >> sbi->log_blocks_per_seg)
@@ -355,6 +357,8 @@ static int stat_show(struct seq_file *s, void *v)
si->skipped_atomic_files[BG_GC] +
si->skipped_atomic_files[FG_GC],
si->skipped_atomic_files[BG_GC]);
+ seq_printf(s, "BG skip : IO: %u, Other: %u\n",
+ si->io_skip_bggc, si->other_skip_bggc);
seq_puts(s, "\nExtent Cache:\n");
seq_printf(s, " - Hit Count: L1-1:%llu L1-2:%llu L2:%llu\n",
si->hit_largest, si->hit_cached,