]> asedeno.scripts.mit.edu Git - linux.git/commit
btrfs: pass number of devices to btrfs_check_raid_min_devices
authorDavid Sterba <dsterba@suse.com>
Mon, 15 Feb 2016 15:00:26 +0000 (16:00 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 28 Apr 2016 08:59:13 +0000 (10:59 +0200)
commit3cc31a0d5bc77e35229671307eba5ea5c4c4cb9d
tree8d2351bcfb4f81b9e70112b6d8e4b0bfd997ecb5
parentf47ab2588e424cb4898b75ace1e2323ddd18b990
btrfs: pass number of devices to btrfs_check_raid_min_devices

Before this patch, btrfs_check_raid_min_devices would do an off-by-one
check of the constraints and not the miminmum check, as its name
suggests. This is not a problem if the only caller is device remove, but
would be confusing for others.

Add an argument with the exact number and let the caller(s) decide if
this needs any adjustments, like when device replace is running.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Tested-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c