]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
f2fs: show current cp state
authorJaegeuk Kim <jaegeuk@kernel.org>
Thu, 26 Oct 2017 08:31:22 +0000 (10:31 +0200)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 6 Nov 2017 00:41:49 +0000 (16:41 -0800)
This patch shows whether checkpoint met any error case.

Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/debug.c

index d441660c3ba6fb5195e1ab44002b00502de9b67f..f7eec506ceead6b3dc7cbd91a8984311d57f549d 100644 (file)
@@ -264,9 +264,10 @@ static int stat_show(struct seq_file *s, void *v)
        list_for_each_entry(si, &f2fs_stat_list, stat_list) {
                update_general_status(si->sbi);
 
-               seq_printf(s, "\n=====[ partition info(%pg). #%d, %s]=====\n",
+               seq_printf(s, "\n=====[ partition info(%pg). #%d, %s, CP: %s]=====\n",
                        si->sbi->sb->s_bdev, i++,
-                       f2fs_readonly(si->sbi->sb) ? "RO": "RW");
+                       f2fs_readonly(si->sbi->sb) ? "RO": "RW",
+                       f2fs_cp_error(si->sbi) ? "Error": "Good");
                seq_printf(s, "[SB: 1] [CP: 2] [SIT: %d] [NAT: %d] ",
                           si->sit_area_segs, si->nat_area_segs);
                seq_printf(s, "[SSA: %d] [MAIN: %d",