]> git.ipfire.org Git - people/ms/linux.git/commitdiff
btrfs: disable balance for extent tree v2 for now
authorJosef Bacik <josef@toxicpanda.com>
Wed, 15 Dec 2021 20:39:59 +0000 (15:39 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 14 Mar 2022 12:13:48 +0000 (13:13 +0100)
With global root id's it makes it problematic to do backref lookups for
balance.  This isn't hard to deal with, but future changes are going to
make it impossible to lookup backrefs on any COWonly roots, so go ahead
and disable balance for now on extent tree v2 until we can add balance
support back in future patches.

Signed-off-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c

index a91e51b0ca81101e9fadfe11de084e962191dc37..4c0f8a10e5cd36f3739bbb9195c5fdaaa2696ec8 100644 (file)
@@ -3235,6 +3235,12 @@ int btrfs_relocate_chunk(struct btrfs_fs_info *fs_info, u64 chunk_offset)
        u64 length;
        int ret;
 
+       if (btrfs_fs_incompat(fs_info, EXTENT_TREE_V2)) {
+               btrfs_err(fs_info,
+                         "relocate: not supported on extent tree v2 yet");
+               return -EINVAL;
+       }
+
        /*
         * Prevent races with automatic removal of unused block groups.
         * After we relocate and before we remove the chunk with offset