btrfs-progs: mark reloc roots as used

btrfs_mark_used_tree_blocks skips the reloc roots for some reason, which
causes problems because these blocks are in use, and we use this helper
to determine if the block accounting is correct with extent tree v2.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Josef Bacik 2021-11-10 15:08:04 -05:00 committed by David Sterba
parent d67bf1b365
commit 368cd3b3d8
1 changed files with 0 additions and 4 deletions

View File

@ -87,10 +87,6 @@ static int traverse_tree_blocks(struct extent_io_tree *tree,
btrfs_item_key_to_cpu(eb, &key, i);
if (key.type != BTRFS_ROOT_ITEM_KEY)
continue;
/* Skip the extent root and reloc roots */
if (key.objectid == BTRFS_TREE_RELOC_OBJECTID ||
key.objectid == BTRFS_DATA_RELOC_TREE_OBJECTID)
continue;
is_extent_root =
key.objectid == BTRFS_EXTENT_TREE_OBJECTID;
/* If pin, skip the extent root */