From 7a5febe9ffeecd1e78c5b505260ccc1ef18021b4 Mon Sep 17 00:00:00 2001 From: NeilBrown Date: Mon, 16 May 2005 21:53:16 -0700 Subject: [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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/md/multipath.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/md/multipath.c') diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c index 4e4bfde..2ae2d70 100644 --- a/drivers/md/multipath.c +++ b/drivers/md/multipath.c @@ -462,10 +462,6 @@ static int multipath_run (mddev_t *mddev) } memset(conf->multipaths, 0, sizeof(struct multipath_info)*mddev->raid_disks); - mddev->queue->unplug_fn = multipath_unplug; - - mddev->queue->issue_flush_fn = multipath_issue_flush; - conf->working_disks = 0; ITERATE_RDEV(mddev,rdev,tmp) { disk_idx = rdev->raid_disk; @@ -528,6 +524,10 @@ static int multipath_run (mddev_t *mddev) * Ok, everything is just fine now */ mddev->array_size = mddev->size; + + mddev->queue->unplug_fn = multipath_unplug; + mddev->queue->issue_flush_fn = multipath_issue_flush; + return 0; out_free_conf: -- cgit v1.1