diff options
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index f6d08f241671..41ced0cbe823 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -19,7 +19,11 @@ | |||
19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | 19 | * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/raid/multipath.h> | 22 | #include <linux/blkdev.h> |
23 | #include <linux/raid/md_u.h> | ||
24 | #include <linux/seq_file.h> | ||
25 | #include "md.h" | ||
26 | #include "multipath.h" | ||
23 | 27 | ||
24 | #define MAX_WORK_PER_DISK 128 | 28 | #define MAX_WORK_PER_DISK 128 |
25 | 29 | ||
@@ -402,6 +406,14 @@ static void multipathd (mddev_t *mddev) | |||
402 | spin_unlock_irqrestore(&conf->device_lock, flags); | 406 | spin_unlock_irqrestore(&conf->device_lock, flags); |
403 | } | 407 | } |
404 | 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 | |||
405 | static int multipath_run (mddev_t *mddev) | 417 | static int multipath_run (mddev_t *mddev) |
406 | { | 418 | { |
407 | multipath_conf_t *conf; | 419 | multipath_conf_t *conf; |
@@ -498,7 +510,7 @@ static int multipath_run (mddev_t *mddev) | |||
498 | /* | 510 | /* |
499 | * Ok, everything is just fine now | 511 | * Ok, everything is just fine now |
500 | */ | 512 | */ |
501 | mddev->array_sectors = mddev->size * 2; | 513 | md_set_array_sectors(mddev, multipath_size(mddev, 0, 0)); |
502 | 514 | ||
503 | mddev->queue->unplug_fn = multipath_unplug; | 515 | mddev->queue->unplug_fn = multipath_unplug; |
504 | mddev->queue->backing_dev_info.congested_fn = multipath_congested; | 516 | mddev->queue->backing_dev_info.congested_fn = multipath_congested; |
@@ -543,6 +555,7 @@ static struct mdk_personality multipath_personality = | |||
543 | .error_handler = multipath_error, | 555 | .error_handler = multipath_error, |
544 | .hot_add_disk = multipath_add_disk, | 556 | .hot_add_disk = multipath_add_disk, |
545 | .hot_remove_disk= multipath_remove_disk, | 557 | .hot_remove_disk= multipath_remove_disk, |
558 | .size = multipath_size, | ||
546 | }; | 559 | }; |
547 | 560 | ||
548 | static int __init multipath_init (void) | 561 | static int __init multipath_init (void) |