[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>
This commit is contained in:
committed by
Linus Torvalds
parent
29ac8e056f
commit
7a5febe9ff
@@ -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:
|
||||
|
Reference in New Issue
Block a user