btrfs: use raid_attr table to find profiles for integrity lowering
authorDavid Sterba <dsterba@suse.com>
Fri, 17 May 2019 09:43:29 +0000 (11:43 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 1 Jul 2019 11:34:57 +0000 (13:34 +0200)
commit1e2500449a4d75b6e3a50205576ac89fa4c808da
tree6351e4bb7109aced1f2d208bbdf0fe02ef340775
parent1d7a57552c36afd7fd7306f0b0738199dde668e4
btrfs: use raid_attr table to find profiles for integrity lowering

Replace open coded list of the profiles by selecting them from the
raid_attr table. The criteria are now more explicit, we need profiles
that have more than 1 copy of the data or can reconstruct the data with
a missing device.

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