MD: raid5 do not set fullsync
authorJonathan Brassow <jbrassow@redhat.com>
Wed, 8 Jun 2011 23:00:28 +0000 (18:00 -0500)
committerNeilBrown <neilb@suse.de>
Thu, 9 Jun 2011 01:42:29 +0000 (11:42 +1000)
Add check to determine if a device needs full resync or if partial resync will do

RAID 5 was assuming that if a device was not In_sync, it must undergo a full
resync.  We add a check to see if 'saved_raid_disk' is the same as 'raid_disk'.
If it is, we can safely skip the full resync and rely on the bitmap for
partial recovery instead.  This is the legitimate purpose of 'saved_raid_disk',
from md.h:
int saved_raid_disk;            /* role that device used to have in the
                                 * array and could again if we did a partial
                                 * resync from the bitmap
                                 */

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>

No differences found