]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: raid56: clear incompat block group flags after removing the last one
authorDavid Sterba <dsterba@suse.com>
Tue, 11 Jun 2019 12:31:01 +0000 (14:31 +0200)
committerDavid Sterba <dsterba@suse.com>
Tue, 2 Jul 2019 10:30:48 +0000 (12:30 +0200)
commitff0a85c084e0706ac0f70ed894144b5c9a0d0fba
tree26def269ba0b6c73bd1233d09394d7e85db641d7
parent3df0a10d350fe8f5a1b457b1fa157bca058222cd
btrfs: raid56: clear incompat block group flags after removing the last one

The incompat bit for RAID56 is set either at mount time or automatically
when the profile is used by balance. The part where the bit is removed
is missing and can be unexpected or undesired when an older kernel is
needed.

This patch will drop the incompat bit after this command, assuming
that RAID5 profile is not used by system or metadata:

 $ btrfs balance start -dconvert=raid5 /mnt
 $ btrfs balance start -dconvert=raid1 /mnt

This will print "clearing 128 feature flag" to the system log.

The patch is safe for backporting to older kernels.

Reported-by: Hugo Mills <hugo@carfax.org.uk>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent-tree.c