For defrag, resize, sload tools, let's advise to mount unclean image to replay journal first in order to not lose any fsynced data.
Signed-off-by: Chao Yu <yuch...@huawei.com> --- fsck/mount.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fsck/mount.c b/fsck/mount.c index ad20d19..6e950bd 100644 --- a/fsck/mount.c +++ b/fsck/mount.c @@ -2969,6 +2969,12 @@ int f2fs_do_mount(struct f2fs_sb_info *sbi) } cp = F2FS_CKPT(sbi); + if (c.func != FSCK && c.func != DUMP && + !is_set_ckpt_flags(F2FS_CKPT(sbi), CP_UMOUNT_FLAG)) { + ERR_MSG("Mount unclean image to replay log first\n"); + return -1; + } + print_ckpt_info(sbi); if (c.quota_fix) { -- 2.18.0.rc1 _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel