aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-07-10 07:44:15 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-07-10 16:24:16 -0400
commit0b8c9de05c2a860fe6b02fedcb48763bcee648b3 (patch)
tree893228041dfcc44a216a6887e75c2424e0a8bca9 /drivers/md/raid5.c
parent31b65a0d3894566191b91fbadd122c354a363b5d (diff)
[PATCH] md: delay starting md threads until array is completely setup
When an array is started we start one or two threads (two if there is a reshape or recovery that needs to be completed). We currently start these *before* the array is completely set up and in particular before queue->queuedata is set. If the thread actually starts very quickly on another CPU, we can end up dereferencing queue->queuedata and oops. This patch also makes sure we don't try to start a recovery if a reshape is being restarted. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 5764387c6989..a02f35f1a796 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3246,9 +3246,6 @@ static int run(mddev_t *mddev)
3246 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery); 3246 set_bit(MD_RECOVERY_RUNNING, &mddev->recovery);
3247 mddev->sync_thread = md_register_thread(md_do_sync, mddev, 3247 mddev->sync_thread = md_register_thread(md_do_sync, mddev,
3248 "%s_reshape"); 3248 "%s_reshape");
3249 /* FIXME if md_register_thread fails?? */
3250 md_wakeup_thread(mddev->sync_thread);
3251
3252 } 3249 }
3253 3250
3254 /* read-ahead size must cover two whole stripes, which is 3251 /* read-ahead size must cover two whole stripes, which is