summaryrefslogtreecommitdiffstats
path: root/Documentation/driver-model
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2018-01-31 13:56:15 +0800
committerDavid Sterba <dsterba@suse.com>2018-03-31 01:26:56 +0200
commitba89b80268c162eca8f23c5d71eb710d65a132fe (patch)
tree503e0c94152392e92f75ccae0ab915018582b926 /Documentation/driver-model
parent6f47c706d9d4055ecdd125023577a20449c12b24 (diff)
downloadlinux-ba89b80268c162eca8f23c5d71eb710d65a132fe.tar.bz2
btrfs: volumes: Remove the meaningless condition of minimal nr_devs when allocating a chunk
When checking the minimal nr_devs, there is one dead and meaningless condition: if (ndevs < devs_increment * sub_stripes || ndevs < devs_min) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This condition is meaningless, @devs_increment has nothing to do with @sub_stripes. In fact, in btrfs_raid_array[], profile with sub_stripes larger than 1 (RAID10) already has the @devs_increment set to 2. So no need to multiple it by @sub_stripes. And above condition is also dead. For RAID10, @devs_increment * @sub_stripes equals 4, which is also the @devs_min of RAID10. For other profiles, @sub_stripes is always 1, and since @ndevs is rounded down to @devs_increment, the condition will always be true. Remove the meaningless condition to make later reader wander less. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'Documentation/driver-model')
0 files changed, 0 insertions, 0 deletions