aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/debug.c
diff options
context:
space:
mode:
authorDaniel Rosenberg <drosen@google.com>2018-08-20 22:21:43 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2018-10-16 12:36:39 -0400
commit4354994f097d068a894aa1a0860da54571df3582 (patch)
treebfa7fb1e09a2caa88aa2cdcf129834537a4c6a40 /fs/f2fs/debug.c
parentfb7d70db305a1446864227abf711b756568f8242 (diff)
f2fs: checkpoint disabling
Note that, it requires "f2fs: return correct errno in f2fs_gc". This adds a lightweight non-persistent snapshotting scheme to f2fs. To use, mount with the option checkpoint=disable, and to return to normal operation, remount with checkpoint=enable. If the filesystem is shut down before remounting with checkpoint=enable, it will revert back to its apparent state when it was first mounted with checkpoint=disable. This is useful for situations where you wish to be able to roll back the state of the disk in case of some critical failure. Signed-off-by: Daniel Rosenberg <drosen@google.com> [Jaegeuk Kim: use SB_RDONLY instead of MS_RDONLY] Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r--fs/f2fs/debug.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c
index 75bc62edc4c1..026e10f30889 100644
--- a/fs/f2fs/debug.c
+++ b/fs/f2fs/debug.c
@@ -272,7 +272,8 @@ static int stat_show(struct seq_file *s, void *v)
272 seq_printf(s, "\n=====[ partition info(%pg). #%d, %s, CP: %s]=====\n", 272 seq_printf(s, "\n=====[ partition info(%pg). #%d, %s, CP: %s]=====\n",
273 si->sbi->sb->s_bdev, i++, 273 si->sbi->sb->s_bdev, i++,
274 f2fs_readonly(si->sbi->sb) ? "RO": "RW", 274 f2fs_readonly(si->sbi->sb) ? "RO": "RW",
275 f2fs_cp_error(si->sbi) ? "Error": "Good"); 275 is_set_ckpt_flags(si->sbi, CP_DISABLED_FLAG) ?
276 "Disabled": (f2fs_cp_error(si->sbi) ? "Error": "Good"));
276 seq_printf(s, "[SB: 1] [CP: 2] [SIT: %d] [NAT: %d] ", 277 seq_printf(s, "[SB: 1] [CP: 2] [SIT: %d] [NAT: %d] ",
277 si->sit_area_segs, si->nat_area_segs); 278 si->sit_area_segs, si->nat_area_segs);
278 seq_printf(s, "[SSA: %d] [MAIN: %d", 279 seq_printf(s, "[SSA: %d] [MAIN: %d",