aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/multipath.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r--drivers/md/multipath.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 1891e4930dcc..2ae2d709cb15 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -103,7 +103,8 @@ static void multipath_end_bh_io (struct multipath_bh *mp_bh, int err)
103 mempool_free(mp_bh, conf->pool); 103 mempool_free(mp_bh, conf->pool);
104} 104}
105 105
106int multipath_end_request(struct bio *bio, unsigned int bytes_done, int error) 106static int multipath_end_request(struct bio *bio, unsigned int bytes_done,
107 int error)
107{ 108{
108 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags); 109 int uptodate = test_bit(BIO_UPTODATE, &bio->bi_flags);
109 struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private); 110 struct multipath_bh * mp_bh = (struct multipath_bh *)(bio->bi_private);
@@ -461,10 +462,6 @@ static int multipath_run (mddev_t *mddev)
461 } 462 }
462 memset(conf->multipaths, 0, sizeof(struct multipath_info)*mddev->raid_disks); 463 memset(conf->multipaths, 0, sizeof(struct multipath_info)*mddev->raid_disks);
463 464
464 mddev->queue->unplug_fn = multipath_unplug;
465
466 mddev->queue->issue_flush_fn = multipath_issue_flush;
467
468 conf->working_disks = 0; 465 conf->working_disks = 0;
469 ITERATE_RDEV(mddev,rdev,tmp) { 466 ITERATE_RDEV(mddev,rdev,tmp) {
470 disk_idx = rdev->raid_disk; 467 disk_idx = rdev->raid_disk;
@@ -527,6 +524,10 @@ static int multipath_run (mddev_t *mddev)
527 * Ok, everything is just fine now 524 * Ok, everything is just fine now
528 */ 525 */
529 mddev->array_size = mddev->size; 526 mddev->array_size = mddev->size;
527
528 mddev->queue->unplug_fn = multipath_unplug;
529 mddev->queue->issue_flush_fn = multipath_issue_flush;
530
530 return 0; 531 return 0;
531 532
532out_free_conf: 533out_free_conf: