]> git.baikalelectronics.ru Git - kernel.git/commit
md: fix the test for finding spares in raid5_start_reshape.
authorNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 00:57:43 +0000 (11:57 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 00:57:43 +0000 (11:57 +1100)
commitdb4a426c0b0282e24d28ae86515acbec88d9d545
treeae92280e8be9df25fd20fea87efcbe72bd855ae9
parentbb3c37e1b550a8c7e2f5516505f2804882746793
md: fix the test for finding spares in raid5_start_reshape.

As spares can be added to the array before the reshape is started,
we need to find and count them when checking there are enough.
The array could have been degraded, so we need to check all devices,
no just those out side of the range of devices in the array before
the reshape.

So instead of checking the index, check the In_sync flag as that
reliably tells if the device is a spare or this purpose.

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