aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/multipath.c
diff options
context:
space:
mode:
authorNeil Brown <neilb@notabene.brown>2008-06-27 18:31:31 -0400
committerNeil Brown <neilb@notabene.brown>2008-06-27 18:31:31 -0400
commit6c2fce2ef6b4821c21b5c42c7207cb9cf8c87eda (patch)
tree726b16f46c039df387f7cdfe0d195821d8955532 /drivers/md/multipath.c
parent8ed0a5216a0238f53b482ec88ce4aeed4b9f0da1 (diff)
Support adding a spare to a live md array with external metadata.
i.e. extend the 'md/dev-XXX/slot' attribute so that you can tell a device to fill an vacant slot in an and md array. Signed-off-by: Neil Brown <neilb@suse.de>
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r--drivers/md/multipath.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index e968116e0de9..4a1d714c048e 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -284,10 +284,15 @@ static int multipath_add_disk(mddev_t *mddev, mdk_rdev_t *rdev)
284 int found = 0; 284 int found = 0;
285 int path; 285 int path;
286 struct multipath_info *p; 286 struct multipath_info *p;
287 int first = 0;
288 int last = mddev->raid_disks - 1;
289
290 if (rdev->raid_disk >= 0)
291 first = last = rdev->raid_disk;
287 292
288 print_multipath_conf(conf); 293 print_multipath_conf(conf);
289 294
290 for (path=0; path<mddev->raid_disks; path++) 295 for (path = first; path <= last; path++)
291 if ((p=conf->multipaths+path)->rdev == NULL) { 296 if ((p=conf->multipaths+path)->rdev == NULL) {
292 q = rdev->bdev->bd_disk->queue; 297 q = rdev->bdev->bd_disk->queue;
293 blk_queue_stack_limits(mddev->queue, q); 298 blk_queue_stack_limits(mddev->queue, q);