diff options
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index dcce204b6c73..ab40529bdabe 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -5361,9 +5361,11 @@ static int raid5_start_reshape(mddev_t *mddev) | |||
5361 | !test_bit(Faulty, &rdev->flags)) { | 5361 | !test_bit(Faulty, &rdev->flags)) { |
5362 | if (raid5_add_disk(mddev, rdev) == 0) { | 5362 | if (raid5_add_disk(mddev, rdev) == 0) { |
5363 | char nm[20]; | 5363 | char nm[20]; |
5364 | set_bit(In_sync, &rdev->flags); | 5364 | if (rdev->raid_disk >= conf->previous_raid_disks) |
5365 | set_bit(In_sync, &rdev->flags); | ||
5366 | else | ||
5367 | rdev->recovery_offset = 0; | ||
5365 | added_devices++; | 5368 | added_devices++; |
5366 | rdev->recovery_offset = 0; | ||
5367 | sprintf(nm, "rd%d", rdev->raid_disk); | 5369 | sprintf(nm, "rd%d", rdev->raid_disk); |
5368 | if (sysfs_create_link(&mddev->kobj, | 5370 | if (sysfs_create_link(&mddev->kobj, |
5369 | &rdev->kobj, nm)) | 5371 | &rdev->kobj, nm)) |