diff options
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 87accf74e4b4..a3f6d8668bb3 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -406,6 +406,14 @@ static void multipathd (mddev_t *mddev) | |||
406 | spin_unlock_irqrestore(&conf->device_lock, flags); | 406 | spin_unlock_irqrestore(&conf->device_lock, flags); |
407 | } | 407 | } |
408 | 408 | ||
409 | static sector_t multipath_size(mddev_t *mddev, sector_t sectors, int raid_disks) | ||
410 | { | ||
411 | WARN_ONCE(sectors || raid_disks, | ||
412 | "%s does not support generic reshape\n", __func__); | ||
413 | |||
414 | return mddev->dev_sectors; | ||
415 | } | ||
416 | |||
409 | static int multipath_run (mddev_t *mddev) | 417 | static int multipath_run (mddev_t *mddev) |
410 | { | 418 | { |
411 | multipath_conf_t *conf; | 419 | multipath_conf_t *conf; |
@@ -502,7 +510,7 @@ static int multipath_run (mddev_t *mddev) | |||
502 | /* | 510 | /* |
503 | * Ok, everything is just fine now | 511 | * Ok, everything is just fine now |
504 | */ | 512 | */ |
505 | mddev->array_sectors = mddev->dev_sectors; | 513 | mddev->array_sectors = multipath_size(mddev, 0, 0); |
506 | 514 | ||
507 | mddev->queue->unplug_fn = multipath_unplug; | 515 | mddev->queue->unplug_fn = multipath_unplug; |
508 | mddev->queue->backing_dev_info.congested_fn = multipath_congested; | 516 | mddev->queue->backing_dev_info.congested_fn = multipath_congested; |
@@ -547,6 +555,7 @@ static struct mdk_personality multipath_personality = | |||
547 | .error_handler = multipath_error, | 555 | .error_handler = multipath_error, |
548 | .hot_add_disk = multipath_add_disk, | 556 | .hot_add_disk = multipath_add_disk, |
549 | .hot_remove_disk= multipath_remove_disk, | 557 | .hot_remove_disk= multipath_remove_disk, |
558 | .size = multipath_size, | ||
550 | }; | 559 | }; |
551 | 560 | ||
552 | static int __init multipath_init (void) | 561 | static int __init multipath_init (void) |