Commit 26419d87 authored by Maximilian Attems's avatar Maximilian Attems Committed by Linus Torvalds

[PATCH] drivers/md: replace schedule_timeout() with msleep_interruptible()

Signed-off-by: default avatarNishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: default avatarMaximilian Attems <janitor@sternwelten.at>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 97206f2c
...@@ -3468,8 +3468,7 @@ static void md_do_sync(mddev_t *mddev) ...@@ -3468,8 +3468,7 @@ static void md_do_sync(mddev_t *mddev)
if (currspeed > sysctl_speed_limit_min) { if (currspeed > sysctl_speed_limit_min) {
if ((currspeed > sysctl_speed_limit_max) || if ((currspeed > sysctl_speed_limit_max) ||
!is_mddev_idle(mddev)) { !is_mddev_idle(mddev)) {
current->state = TASK_INTERRUPTIBLE; msleep_interruptible(250);
schedule_timeout(HZ/4);
goto repeat; goto repeat;
} }
} }
......
...@@ -1013,7 +1013,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster) ...@@ -1013,7 +1013,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster)
* put in a delay to throttle resync. * put in a delay to throttle resync.
*/ */
if (!go_faster && waitqueue_active(&conf->wait_resume)) if (!go_faster && waitqueue_active(&conf->wait_resume))
schedule_timeout(HZ); msleep_interruptible(1000);
device_barrier(conf, sector_nr + RESYNC_SECTORS); device_barrier(conf, sector_nr + RESYNC_SECTORS);
/* /*
......
...@@ -1358,7 +1358,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster) ...@@ -1358,7 +1358,7 @@ static int sync_request(mddev_t *mddev, sector_t sector_nr, int go_faster)
* put in a delay to throttle resync. * put in a delay to throttle resync.
*/ */
if (!go_faster && waitqueue_active(&conf->wait_resume)) if (!go_faster && waitqueue_active(&conf->wait_resume))
schedule_timeout(HZ); msleep_interruptible(1000);
device_barrier(conf, sector_nr + RESYNC_SECTORS); device_barrier(conf, sector_nr + RESYNC_SECTORS);
/* Again, very different code for resync and recovery. /* Again, very different code for resync and recovery.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment