]> git.baikalelectronics.ru Git - kernel.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)
commit1a2510d71a898da8e963ff5a752e5d16b04d74f2
tree8d2351bcfb4f81b9e70112b6d8e4b0bfd997ecb5
parent54417232347236505f73f91d04bfb1b42166cd71
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