linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: Fix block groups read which may skip certain block groups
@ 2019-10-30  7:27 Qu Wenruo
  2019-11-01 11:27 ` David Sterba
  0 siblings, 1 reply; 2+ messages in thread
From: Qu Wenruo @ 2019-10-30  7:27 UTC (permalink / raw)
  To: linux-btrfs

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@suse.com>
---
 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


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

* Re: [PATCH] btrfs-progs: Fix block groups read which may skip certain block groups
  2019-10-30  7:27 [PATCH] btrfs-progs: Fix block groups read which may skip certain block groups Qu Wenruo
@ 2019-11-01 11:27 ` David Sterba
  0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2019-11-01 11:27 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: linux-btrfs

On Wed, Oct 30, 2019 at 03:27:11PM +0800, Qu Wenruo wrote:
> 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.

Folded, thanks.

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

end of thread, other threads:[~2019-11-01 11:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-30  7:27 [PATCH] btrfs-progs: Fix block groups read which may skip certain block groups Qu Wenruo
2019-11-01 11:27 ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).