Commit 79d57ab9 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: Don't wait UNINTERRUPTIBLE for other resync to finish
parents a19eee5e 9744197c
...@@ -5761,7 +5761,11 @@ void md_do_sync(mddev_t *mddev) ...@@ -5761,7 +5761,11 @@ void md_do_sync(mddev_t *mddev)
* time 'round when curr_resync == 2 * time 'round when curr_resync == 2
*/ */
continue; continue;
prepare_to_wait(&resync_wait, &wq, TASK_UNINTERRUPTIBLE); /* We need to wait 'interruptible' so as not to
* contribute to the load average, and not to
* be caught by 'softlockup'
*/
prepare_to_wait(&resync_wait, &wq, TASK_INTERRUPTIBLE);
if (!kthread_should_stop() && if (!kthread_should_stop() &&
mddev2->curr_resync >= mddev->curr_resync) { mddev2->curr_resync >= mddev->curr_resync) {
printk(KERN_INFO "md: delaying %s of %s" printk(KERN_INFO "md: delaying %s of %s"
...@@ -5769,6 +5773,8 @@ void md_do_sync(mddev_t *mddev) ...@@ -5769,6 +5773,8 @@ void md_do_sync(mddev_t *mddev)
" share one or more physical units)\n", " share one or more physical units)\n",
desc, mdname(mddev), mdname(mddev2)); desc, mdname(mddev), mdname(mddev2));
mddev_put(mddev2); mddev_put(mddev2);
if (signal_pending(current))
flush_signals(current);
schedule(); schedule();
finish_wait(&resync_wait, &wq); finish_wait(&resync_wait, &wq);
goto try_again; goto try_again;
......
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