aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm-mpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r--drivers/md/dm-mpath.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 890c0e8ed13e..f8aeaaa54afe 100644
--- a/drivers/md/dm-mpath.c
+++ b/drivers/md/dm-mpath.c
@@ -1450,12 +1450,32 @@ static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
1450 return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg); 1450 return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg);
1451} 1451}
1452 1452
1453static int multipath_iterate_devices(struct dm_target *ti,
1454 iterate_devices_callout_fn fn, void *data)
1455{
1456 struct multipath *m = ti->private;
1457 struct priority_group *pg;
1458 struct pgpath *p;
1459 int ret = 0;
1460
1461 list_for_each_entry(pg, &m->priority_groups, list) {
1462 list_for_each_entry(p, &pg->pgpaths, list) {
1463 ret = fn(ti, p->path.dev, ti->begin, data);
1464 if (ret)
1465 goto out;
1466 }
1467 }
1468
1469out:
1470 return ret;
1471}
1472
1453/*----------------------------------------------------------------- 1473/*-----------------------------------------------------------------
1454 * Module setup 1474 * Module setup
1455 *---------------------------------------------------------------*/ 1475 *---------------------------------------------------------------*/
1456static struct target_type multipath_target = { 1476static struct target_type multipath_target = {
1457 .name = "multipath", 1477 .name = "multipath",
1458 .version = {1, 0, 5}, 1478 .version = {1, 1, 0},
1459 .module = THIS_MODULE, 1479 .module = THIS_MODULE,
1460 .ctr = multipath_ctr, 1480 .ctr = multipath_ctr,
1461 .dtr = multipath_dtr, 1481 .dtr = multipath_dtr,
@@ -1466,6 +1486,7 @@ static struct target_type multipath_target = {
1466 .status = multipath_status, 1486 .status = multipath_status,
1467 .message = multipath_message, 1487 .message = multipath_message,
1468 .ioctl = multipath_ioctl, 1488 .ioctl = multipath_ioctl,
1489 .iterate_devices = multipath_iterate_devices,
1469}; 1490};
1470 1491
1471static int __init dm_multipath_init(void) 1492static int __init dm_multipath_init(void)