From: Sheng Yong <[email protected]>
Signed-off-by: Sheng Yong <[email protected]>
Signed-off-by: Jaegeuk Kim <[email protected]>
---
fsck/main.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fsck/main.c b/fsck/main.c
index 93008a5..6058c4d 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -244,6 +244,18 @@ static void do_fsck(struct f2fs_sb_info *sbi)
config.fix_on = 1;
break;
}
+ } else {
+ /*
+ * we can hit this in 3 situations:
+ * 1. fsck -f, fix_on has already been set to 1 when
+ * parsing options;
+ * 2. fsck -a && CP_FSCK_FLAG is set, fix_on has already
+ * been set to 1 when checking CP_FSCK_FLAG;
+ * 3. fsck -p 1 && error is detected, then bug_on is set,
+ * we set fix_on = 1 here, so that fsck can fix errors
+ * automatically
+ */
+ config.fix_on = 1;
}
fsck_chk_orphan_node(sbi);
--
2.6.3
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel