From: NeilBrown Date: Tue, 3 Jul 2012 05:59:06 +0000 (+1000) Subject: md: support re-add of recovering devices. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f456309106e9657645c81bce1a6bb3230393564e;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git md: support re-add of recovering devices. We currently only allow a device to be re-added if it appear to be in-sync. This is overly restrictive as it may be desirable to re-add a device that is in the middle of recovery. So remove the test for "InSync" - the test on rdev->raid_disk is sufficient to ensure that the re-add will succeed. Reported-by: Alexander Lyakas Tested-by: Alexander Lyakas Signed-off-by: NeilBrown --- diff --git a/drivers/md/md.c b/drivers/md/md.c index c601c4be77c..a4c219e3c85 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5784,8 +5784,7 @@ static int add_new_disk(struct mddev * mddev, mdu_disk_info_t *info) super_types[mddev->major_version]. validate_super(mddev, rdev); if ((info->state & (1<flags) || - rdev->raid_disk != info->raid_disk)) { + rdev->raid_disk != info->raid_disk) { /* This was a hot-add request, but events doesn't * match, so reject it. */