aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/raid1.c')
-rw-r--r--drivers/md/raid1.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index c610b947218a..d32fc559ff05 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1103,8 +1103,13 @@ static int raid1_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
1103 int found = 0; 1103 int found = 0;
1104 int mirror = 0; 1104 int mirror = 0;
1105 mirror_info_t *p; 1105 mirror_info_t *p;
1106 int first = 0;
1107 int last = mddev->raid_disks - 1;
1106 1108
1107 for (mirror=0; mirror < mddev->raid_disks; mirror++) 1109 if (rdev->raid_disk >= 0)
1110 first = last = rdev->raid_disk;
1111
1112 for (mirror = first; mirror <= last; mirror++)
1108 if ( !(p=conf->mirrors+mirror)->rdev) { 1113 if ( !(p=conf->mirrors+mirror)->rdev) {
1109 1114
1110 blk_queue_stack_limits(mddev->queue, 1115 blk_queue_stack_limits(mddev->queue,