diff options
author | NeilBrown <neilb@suse.de> | 2008-09-18 21:49:54 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2008-09-18 21:49:54 -0400 |
commit | 9744197c3d7b329590c2be33ad7b17409bd798fe (patch) | |
tree | b82478694d768a54bad23661e31830cc48e95e0f /drivers/md | |
parent | 45e9c0de2e86485f8b6633fd64ab19cfbff167f6 (diff) |
md: Don't wait UNINTERRUPTIBLE for other resync to finish
When two md arrays share some block device (e.g each uses different
partitions on the one device), a resync of one array will wait for
the resync on the other to finish.
This can be a long time and as it currently waits TASK_UNINTERRUPTIBLE,
the softlockup code notices and complains.
So use TASK_INTERRUPTIBLE instead and make sure to flush signals
before calling schedule.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 4790c83d78d..deeac4b4417 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -5761,7 +5761,11 @@ void md_do_sync(mddev_t *mddev) | |||
5761 | * time 'round when curr_resync == 2 | 5761 | * time 'round when curr_resync == 2 |
5762 | */ | 5762 | */ |
5763 | continue; | 5763 | continue; |
5764 | prepare_to_wait(&resync_wait, &wq, TASK_UNINTERRUPTIBLE); | 5764 | /* We need to wait 'interruptible' so as not to |
5765 | * contribute to the load average, and not to | ||
5766 | * be caught by 'softlockup' | ||
5767 | */ | ||
5768 | prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE); | ||
5765 | if (!kthread_should_stop() && | 5769 | if (!kthread_should_stop() && |
5766 | mddev2->curr_resync >= mddev->curr_resync) { | 5770 | mddev2->curr_resync >= mddev->curr_resync) { |
5767 | printk(KERN_INFO "md: delaying %s of %s" | 5771 | printk(KERN_INFO "md: delaying %s of %s" |
@@ -5769,6 +5773,8 @@ void md_do_sync(mddev_t *mddev) | |||
5769 | " share one or more physical units)\n", | 5773 | " share one or more physical units)\n", |
5770 | desc, mdname(mddev), mdname(mddev2)); | 5774 | desc, mdname(mddev), mdname(mddev2)); |
5771 | mddev_put(mddev2); | 5775 | mddev_put(mddev2); |
5776 | if (signal_pending(current)) | ||
5777 | flush_signals(current); | ||
5772 | schedule(); | 5778 | schedule(); |
5773 | finish_wait(&resync_wait, &wq); | 5779 | finish_wait(&resync_wait, &wq); |
5774 | goto try_again; | 5780 | goto try_again; |