aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid1.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@cse.unsw.edu.au>2005-05-17 00:53:16 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-17 10:59:12 -0400
commit7a5febe9ffeecd1e78c5b505260ccc1ef18021b4 (patch)
treef3d61987a3f961f33a77334052805457a2ef2460 /drivers/md/raid1.c
parent29ac8e056f2016a8404edc02749d095019aa1f82 (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/raid1.c')
-rw-r--r--drivers/md/raid1.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 83380b5d6593..1db5de52d376 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1197,10 +1197,6 @@ static int run(mddev_t *mddev)
1197 if (!conf->r1bio_pool) 1197 if (!conf->r1bio_pool)
1198 goto out_no_mem; 1198 goto out_no_mem;
1199 1199
1200 mddev->queue->unplug_fn = raid1_unplug;
1201
1202 mddev->queue->issue_flush_fn = raid1_issue_flush;
1203
1204 ITERATE_RDEV(mddev, rdev, tmp) { 1200 ITERATE_RDEV(mddev, rdev, tmp) {
1205 disk_idx = rdev->raid_disk; 1201 disk_idx = rdev->raid_disk;
1206 if (disk_idx >= mddev->raid_disks 1202 if (disk_idx >= mddev->raid_disks
@@ -1282,6 +1278,9 @@ static int run(mddev_t *mddev)
1282 */ 1278 */
1283 mddev->array_size = mddev->size; 1279 mddev->array_size = mddev->size;
1284 1280
1281 mddev->queue->unplug_fn = raid1_unplug;
1282 mddev->queue->issue_flush_fn = raid1_issue_flush;
1283
1285 return 0; 1284 return 0;
1286 1285
1287out_no_mem: 1286out_no_mem: