OSDN Git Service

md/raid5: More careful check for "has array failed".
authorNeilBrown <neilb@suse.de>
Wed, 16 Jun 2010 07:17:53 +0000 (17:17 +1000)
committerNeilBrown <neilb@suse.de>
Thu, 24 Jun 2010 03:35:27 +0000 (13:35 +1000)
commit674806d62fb02a22eea948c9f1b5e58e0947b728
tree3367850a95d62713aa96acd2aecc493b66779398
parent70fffd0bfab1558a8c64c5e903dea1fb84cd9f6b
md/raid5: More careful check for "has array failed".

When we are reshaping an array, the device failure combinations
that cause us to decide that the array as failed are more subtle.

In particular, any 'spare' will be fully in-sync in the section
of the array that has already been reshaped, thus failures that
affect only that section are less critical.

So encode this subtlety in a new function and call it as appropriate.

The case that showed this problem was a 4 drive RAID5 to 8 drive RAID6
conversion where the last two devices failed.
This resulted in:

  good good good good incomplete good good failed failed

while converting a 5-drive RAID6 to 8 drive RAID5
The incomplete device causes the whole array to look bad,
bad as it was actually good for the section that had been
converted to 8-drives, all the data was actually safe.

Reported-by: Terry Morris <tbmorris@tbmorris.com>
Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c