]> git.baikalelectronics.ru Git - kernel.git/commit
md: range check slot number when manually adding a spare.
authorNeilBrown <neilb@suse.de>
Thu, 13 Jan 2011 22:14:34 +0000 (09:14 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 13 Jan 2011 22:14:34 +0000 (09:14 +1100)
commit012ef2a6c85d1f48d020eb57eb2c18352d030ff7
tree02da80f72095418dd1a08661f59c24607029a8e7
parent6308a249ad847d99890aea1d90796224cd648e62
md: range check slot number when manually adding a spare.

When adding a spare to an active array, we should check the slot
number, but allow it to be larger than raid_disks if a reshape
is being prepared.

Apply the same test when adding a device to an
array-under-construction.  It already had most of the test in place,
but not quite all.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/md.c