[f2fs-dev] [PATCH] fsck.f2fs: fix the bug in reserve_new_block

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



if we new node block in fsck flow, we need to update
the valid_node_cnt at the same time.

Signed-off-by: Lihong Kou <koulihong@xxxxxxxxxx>
---
 fsck/segment.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/fsck/segment.c b/fsck/segment.c
index 98c836e..c16fb3a 100644
--- a/fsck/segment.c
+++ b/fsck/segment.c
@@ -51,8 +51,11 @@ void reserve_new_block(struct f2fs_sb_info *sbi, block_t *to,
 
 	if (old_blkaddr == NULL_ADDR) {
 		sbi->total_valid_block_count++;
-		if (c.func == FSCK)
+		if (c.func == FSCK) {
 			fsck->chk.valid_blk_cnt++;
+			if (IS_NODESEG(type))
+				fsck->chk.valid_node_cnt++;
+		}
 	}
 	se->dirty = 1;
 
-- 
2.7.4




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux