All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 1/8] fsck.f2fs: do not set fix_on directly
@ 2017-10-31  1:38 Sheng Yong
  2017-10-31  1:38 ` [RFC PATCH 2/8] fsck.f2fs: do not fix corrupted nat entries in build_nat_area_bitmap Sheng Yong
                   ` (7 more replies)
  0 siblings, 8 replies; 29+ messages in thread
From: Sheng Yong @ 2017-10-31  1:38 UTC (permalink / raw)
  To: jaegeuk, yuchao0; +Cc: shengyong1, linux-f2fs-devel

Do not set fix_on if it is allowed by user.

Signed-off-by: Sheng Yong <shengyong1@huawei.com>
---
 fsck/main.c  | 2 +-
 fsck/mount.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fsck/main.c b/fsck/main.c
index c9411eb..93037e1 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -429,7 +429,7 @@ static void do_fsck(struct f2fs_sb_info *sbi)
 				c.fix_on = 1;
 			break;
 		}
-	} else {
+	} else if (c.preen_mode) {
 		/*
 		 * we can hit this in 3 situations:
 		 *  1. fsck -f, fix_on has already been set to 1 when
diff --git a/fsck/mount.c b/fsck/mount.c
index 29af3b7..faa9bc8 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@ -1879,6 +1879,7 @@ void nullify_nat_entry(struct f2fs_sb_info *sbi, u32 nid)
 
 	memset(&nat_block->entries[entry_off], 0,
 					sizeof(struct f2fs_nat_entry));
+	FIX_MSG("Remove nid [0x%x] in NAT\n", nid);
 
 	ret = dev_write_block(nat_block, block_addr);
 	ASSERT(ret >= 0);
@@ -2031,7 +2032,6 @@ void build_nat_area_bitmap(struct f2fs_sb_info *sbi)
 				 */
 				ASSERT_MSG("Invalid nat entry[0]: "
 					"blk_addr[0x%x]\n", ni.blk_addr);
-				c.fix_on = 1;
 				fsck->chk.valid_nat_entry_cnt--;
 			}
 
-- 
2.11.0


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply related	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2017-10-31 11:13 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-31  1:38 [RFC PATCH 1/8] fsck.f2fs: do not set fix_on directly Sheng Yong
2017-10-31  1:38 ` [RFC PATCH 2/8] fsck.f2fs: do not fix corrupted nat entries in build_nat_area_bitmap Sheng Yong
2017-10-31  7:20   ` Chao Yu
2017-10-31  8:57     ` Sheng Yong
2017-10-31 10:43       ` Chao Yu
2017-10-31  1:38 ` [RFC PATCH 3/8] dump/fsck: introduce print_xattr_entry Sheng Yong
2017-10-31  7:51   ` Chao Yu
2017-10-31  9:02     ` Sheng Yong
2017-10-31 10:44       ` Chao Yu
2017-10-31  1:38 ` [RFC PATCH 4/8] dump.f2fs: introduce dump_xattr Sheng Yong
2017-10-31  7:51   ` Chao Yu
2017-10-31  9:11     ` Sheng Yong
2017-10-31 10:46       ` Chao Yu
2017-10-31  1:38 ` [RFC PATCH 5/8] dump.f2fs: do not dump encrypted files Sheng Yong
2017-10-31  7:57   ` Chao Yu
2017-10-31  9:16     ` Sheng Yong
2017-10-31 11:09       ` Chao Yu
2017-10-31  1:38 ` [RFC PATCH 6/8] fsck.f2fs: introduce new option --dry-run Sheng Yong
2017-10-31  7:57   ` Chao Yu
2017-10-31  9:19     ` Sheng Yong
2017-10-31 11:10       ` Chao Yu
2017-10-31  1:38 ` [RFC PATCH 7/8] fsck.f2fs: introduce sanity_check_inode Sheng Yong
2017-10-31  8:04   ` Chao Yu
2017-10-31  9:21     ` Sheng Yong
2017-10-31  1:38 ` [RFC PATCH 8/8] f2fs-tools: remove unused list.h Sheng Yong
2017-10-31  8:05   ` Chao Yu
2017-10-31  7:06 ` [RFC PATCH 1/8] fsck.f2fs: do not set fix_on directly Chao Yu
2017-10-31  9:34   ` Sheng Yong
2017-10-31 11:12     ` Chao Yu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.