mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git
synced 2024-11-23 17:53:39 +08:00
fsck.f2fs: check nat_bits separately from bug_on
It checks nat_bits separately, and enable it seamlessly. Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
05779015ae
commit
870817c410
@ -2676,7 +2676,7 @@ int fsck_verify(struct f2fs_sb_info *sbi)
|
||||
if (force || (c.fix_on && !c.ro)) {
|
||||
struct f2fs_checkpoint *cp = F2FS_CKPT(sbi);
|
||||
|
||||
if (force || c.bug_on) {
|
||||
if (force || c.bug_on || c.bug_nat_bits) {
|
||||
/* flush nats to write_nit_bits below */
|
||||
flush_journal_entries(sbi);
|
||||
fix_hard_links(sbi);
|
||||
|
@ -1242,7 +1242,7 @@ out:
|
||||
if (!err) {
|
||||
MSG(0, "Info: Checked valid nat_bits in checkpoint\n");
|
||||
} else {
|
||||
c.bug_on = 1;
|
||||
c.bug_nat_bits = 1;
|
||||
MSG(0, "Info: Corrupted valid nat_bits in checkpoint\n");
|
||||
}
|
||||
return err;
|
||||
|
@ -372,6 +372,7 @@ struct f2fs_configuration {
|
||||
int force;
|
||||
int defset;
|
||||
int bug_on;
|
||||
int bug_nat_bits;
|
||||
int alloc_failed;
|
||||
int auto_fix;
|
||||
int quota_fix;
|
||||
|
Loading…
Reference in New Issue
Block a user