aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid6main.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-01-06 03:20:16 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:34:03 -0500
commitb15c2e57f0f5bf596a19e9c5571e5b07cdfc7363 (patch)
treeda68e3ed72e59212936daf7dd4c86f1f9a7ab386 /drivers/md/raid6main.c
parent6ff8d8ec06690f4011a6c3ad9e0759b9094f0601 (diff)
[PATCH] md: move bitmap_create to after md array has been initialised
This is important because bitmap_create uses mddev->resync_max_sectors and that doesn't have a valid value until after the array has been initialised (with pers->run()). [It doesn't make a difference for current personalities that support bitmaps, but will make a difference for raid10] This has the added advantage of meaning with can move the thread->timeout manipulation inside the bitmap.c code instead of sprinkling identical code throughout all personalities. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/raid6main.c')
-rw-r--r--drivers/md/raid6main.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index 9ac6dcd55127..304455d236f9 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -1990,9 +1990,6 @@ static int run(mddev_t *mddev)
1990 /* Ok, everything is just fine now */ 1990 /* Ok, everything is just fine now */
1991 mddev->array_size = mddev->size * (mddev->raid_disks - 2); 1991 mddev->array_size = mddev->size * (mddev->raid_disks - 2);
1992 1992
1993 if (mddev->bitmap)
1994 mddev->thread->timeout = mddev->bitmap->daemon_sleep * HZ;
1995
1996 mddev->queue->unplug_fn = raid6_unplug_device; 1993 mddev->queue->unplug_fn = raid6_unplug_device;
1997 mddev->queue->issue_flush_fn = raid6_issue_flush; 1994 mddev->queue->issue_flush_fn = raid6_issue_flush;
1998 return 0; 1995 return 0;
@@ -2228,14 +2225,8 @@ static void raid6_quiesce(mddev_t *mddev, int state)
2228 spin_unlock_irq(&conf->device_lock); 2225 spin_unlock_irq(&conf->device_lock);
2229 break; 2226 break;
2230 } 2227 }
2231 if (mddev->thread) {
2232 if (mddev->bitmap)
2233 mddev->thread->timeout = mddev->bitmap->daemon_sleep * HZ;
2234 else
2235 mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
2236 md_wakeup_thread(mddev->thread);
2237 }
2238} 2228}
2229
2239static mdk_personality_t raid6_personality= 2230static mdk_personality_t raid6_personality=
2240{ 2231{
2241 .name = "raid6", 2232 .name = "raid6",