]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix removal of raid[56|1c34} incompat flags after removing block group
authorFilipe Manana <fdmanana@suse.com>
Fri, 20 Mar 2020 18:43:48 +0000 (18:43 +0000)
committerDavid Sterba <dsterba@suse.com>
Fri, 20 Mar 2020 20:31:32 +0000 (21:31 +0100)
commit66651d9e14532f91e8b97bb3c79413b51bc16e3b
treeeec94933243b80d040a865b89e6a7744ea836f26
parente2a2923ed1838a8da020bb07709f5ebafd14ed52
btrfs: fix removal of raid[56|1c34} incompat flags after removing block group

We are incorrectly dropping the raid56 and raid1c34 incompat flags when
there are still raid56 and raid1c34 block groups, not when we do not any
of those anymore. The logic just got unintentionally broken after adding
the support for the raid1c34 modes.

Fix this by clear the flags only if we do not have block groups with the
respective profiles.

Fixes: 9269d7b09144 ("btrfs: drop incompat bit for raid1c34 after last block group is gone")
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c