diff options
author | NeilBrown <neilb@cse.unsw.edu.au> | 2005-05-17 00:53:16 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-17 10:59:12 -0400 |
commit | 7a5febe9ffeecd1e78c5b505260ccc1ef18021b4 (patch) | |
tree | f3d61987a3f961f33a77334052805457a2ef2460 /drivers/md/multipath.c | |
parent | 29ac8e056f2016a8404edc02749d095019aa1f82 (diff) |
[PATCH] md: set the unplug_fn and issue_flush_fn for md devices *after* committed to creation
We we set the too early, they may still be in place and possibly get called
even though the array didn't get set up properly.
Signed-off-by: Neil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r-- | drivers/md/multipath.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 4e4bfde3db5d..2ae2d709cb15 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c | |||
@@ -462,10 +462,6 @@ static int multipath_run (mddev_t *mddev) | |||
462 | } | 462 | } |
463 | memset(conf->multipaths, 0, sizeof(struct multipath_info)*mddev->raid_disks); | 463 | memset(conf->multipaths, 0, sizeof(struct multipath_info)*mddev->raid_disks); |
464 | 464 | ||
465 | mddev->queue->unplug_fn = multipath_unplug; | ||
466 | |||
467 | mddev->queue->issue_flush_fn = multipath_issue_flush; | ||
468 | |||
469 | conf->working_disks = 0; | 465 | conf->working_disks = 0; |
470 | ITERATE_RDEV(mddev,rdev,tmp) { | 466 | ITERATE_RDEV(mddev,rdev,tmp) { |
471 | disk_idx = rdev->raid_disk; | 467 | disk_idx = rdev->raid_disk; |
@@ -528,6 +524,10 @@ static int multipath_run (mddev_t *mddev) | |||
528 | * Ok, everything is just fine now | 524 | * Ok, everything is just fine now |
529 | */ | 525 | */ |
530 | 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 | |||
531 | return 0; | 531 | return 0; |
532 | 532 | ||
533 | out_free_conf: | 533 | out_free_conf: |