mirror of
https://github.com/kdave/btrfs-progs
synced 2025-04-18 13:05:20 +00:00
btrfs-progs: do not try to load the free space tree if it's not enabled
We were previously getting away with this because the load_global_roots() treated ENOENT like everything was a-ok. However that was a bug and fixing that bug uncovered a problem where we were unconditionally trying to load the free space tree. Fix that by skipping the load if we do not have the compat bit set. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
3aacdc4404
commit
29beeb1a30
@ -1149,6 +1149,8 @@ static int load_global_roots(struct btrfs_fs_info *fs_info, unsigned flags)
|
||||
"csum");
|
||||
if (ret)
|
||||
goto out;
|
||||
if (!btrfs_fs_compat_ro(fs_info, FREE_SPACE_TREE))
|
||||
goto out;
|
||||
ret = load_global_roots_objectid(fs_info, path,
|
||||
BTRFS_FREE_SPACE_TREE_OBJECTID, flags,
|
||||
"free space");
|
||||
|
Loading…
Reference in New Issue
Block a user