Commit fb6b2f61 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] md: Make sure yielding thread actually yields cpu when waiting for turn at reconstruct.

parent fc70014e
...@@ -2815,8 +2815,10 @@ static void md_do_sync(void *data) ...@@ -2815,8 +2815,10 @@ static void md_do_sync(void *data)
printk(KERN_INFO "md: delaying resync of md%d until md%d " printk(KERN_INFO "md: delaying resync of md%d until md%d "
"has finished resync (they share one or more physical units)\n", "has finished resync (they share one or more physical units)\n",
mdidx(mddev), mdidx(mddev2)); mdidx(mddev), mdidx(mddev2));
if (mddev < mddev2) /* arbitrarily yield */ if (mddev < mddev2) {/* arbitrarily yield */
mddev->curr_resync = 1; mddev->curr_resync = 1;
yield();
}
if (wait_event_interruptible(resync_wait, if (wait_event_interruptible(resync_wait,
mddev2->curr_resync < 2)) { mddev2->curr_resync < 2)) {
flush_curr_signals(); flush_curr_signals();
......
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