[PATCH] btrfs-progs: Fix block groups read which may skip certain block groups

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

 



Previous patch "btrfs-progs: Refactor btrfs_read_block_groups()" lacks a
fix which is in kernel counter part but not in btrfs-progs.

It doesn't reset the key.offset used to search next block group, thus
btrfs-progs can skip certain block groups items.

This can fail fsck/039 test case.

Please fold this fix into that patch.

Signed-off-by: Qu Wenruo <wqu@xxxxxxxx>
---
 extent-tree.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/extent-tree.c b/extent-tree.c
index 443f327a6bed..52b963265a07 100644
--- a/extent-tree.c
+++ b/extent-tree.c
@@ -2747,6 +2747,7 @@ int btrfs_read_block_groups(struct btrfs_fs_info *fs_info)
 			key.objectid++;
 		else
 			key.objectid = key.objectid + key.offset;
+		key.offset = 0;
 		btrfs_release_path(&path);
 	}
 	ret = 0;
-- 
2.23.0




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux