aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.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/raid5.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/raid5.c')
-rw-r--r--drivers/md/raid5.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 53a0f2ce76c8..0d016a844ec6 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -1964,9 +1964,6 @@ static int run(mddev_t *mddev)
1964 /* Ok, everything is just fine now */ 1964 /* Ok, everything is just fine now */
1965 sysfs_create_group(&mddev->kobj, &raid5_attrs_group); 1965 sysfs_create_group(&mddev->kobj, &raid5_attrs_group);
1966 1966
1967 if (mddev->bitmap)
1968 mddev->thread->timeout = mddev->bitmap->daemon_sleep * HZ;
1969
1970 mddev->queue->unplug_fn = raid5_unplug_device; 1967 mddev->queue->unplug_fn = raid5_unplug_device;
1971 mddev->queue->issue_flush_fn = raid5_issue_flush; 1968 mddev->queue->issue_flush_fn = raid5_issue_flush;
1972 1969
@@ -2200,14 +2197,8 @@ static void raid5_quiesce(mddev_t *mddev, int state)
2200 spin_unlock_irq(&conf->device_lock); 2197 spin_unlock_irq(&conf->device_lock);
2201 break; 2198 break;
2202 } 2199 }
2203 if (mddev->thread) {
2204 if (mddev->bitmap)
2205 mddev->thread->timeout = mddev->bitmap->daemon_sleep * HZ;
2206 else
2207 mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
2208 md_wakeup_thread(mddev->thread);
2209 }
2210} 2200}
2201
2211static mdk_personality_t raid5_personality= 2202static mdk_personality_t raid5_personality=
2212{ 2203{
2213 .name = "raid5", 2204 .name = "raid5",