It checks nat_bits separately, and enable it seamlessly.
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
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);
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;
int force;
int defset;
int bug_on;
+ int bug_nat_bits;
int alloc_failed;
int auto_fix;
int quota_fix;