diff options
author | NeilBrown <neilb@suse.de> | 2012-07-03 01:59:06 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2012-07-03 01:59:06 -0400 |
commit | f456309106e9657645c81bce1a6bb3230393564e (patch) | |
tree | 0c24dc48b58913930702db35a0bef7d303dd1849 /drivers/md/md.c | |
parent | 32644afd8975d19174bcb9ba34687c32dd810a09 (diff) |
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 <alex.bolshoy@gmail.com>
Tested-by: Alexander Lyakas <alex.bolshoy@gmail.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index c601c4be77c7..a4c219e3c859 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) | |||
5784 | super_types[mddev->major_version]. | 5784 | super_types[mddev->major_version]. |
5785 | validate_super(mddev, rdev); | 5785 | validate_super(mddev, rdev); |
5786 | if ((info->state & (1<<MD_DISK_SYNC)) && | 5786 | if ((info->state & (1<<MD_DISK_SYNC)) && |
5787 | (!test_bit(In_sync, &rdev->flags) || | 5787 | rdev->raid_disk != info->raid_disk) { |
5788 | rdev->raid_disk != info->raid_disk)) { | ||
5789 | /* This was a hot-add request, but events doesn't | 5788 | /* This was a hot-add request, but events doesn't |
5790 | * match, so reject it. | 5789 | * match, so reject it. |
5791 | */ | 5790 | */ |