md: remove needless setting of thread->timeout in raid10_quiesce
authorNeilBrown <neilb@suse.de>
Mon, 14 Dec 2009 01:49:54 +0000 (12:49 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 14 Dec 2009 01:51:41 +0000 (12:51 +1100)
As bitmap_create and bitmap_destroy already set thread->timeout
as appropriate, there is no need to do it in raid10_quiesce.
There is a possible need to wake the thread after the timeout
has been set low, but it is better to do that where the timeout
is actually set low, in bitmap_create.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/bitmap.c
drivers/md/raid10.c

index c1f28a87ea59849f9f5d279844af104c3c85690d..b1bcd36ca963db3fbed33583dcfc0f30d540606c 100644 (file)
@@ -1695,6 +1695,7 @@ int bitmap_create(mddev_t *mddev)
        mddev->bitmap = bitmap;
 
        mddev->thread->timeout = mddev->bitmap_info.daemon_sleep;
+       md_wakeup_thread(mddev->thread);
 
        bitmap_update_sb(bitmap);
 
index 064c2bb5ee634047648b959f48556c00124f0968..d9e28a65af58cdc5b2d394f1d1b5debf040477f1 100644 (file)
@@ -2275,13 +2275,6 @@ static void raid10_quiesce(mddev_t *mddev, int state)
                lower_barrier(conf);
                break;
        }
-       if (mddev->thread) {
-               if (mddev->bitmap)
-                       mddev->thread->timeout = mddev->bitmap_info.daemon_sleep;
-               else
-                       mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
-               md_wakeup_thread(mddev->thread);
-       }
 }
 
 static struct mdk_personality raid10_personality =