NeilBrown ee0b024403 md/raid1,raid10: fix deadlock with freeze_array()
When raid1/raid10 needs to fix a read error, it first drains
all pending requests by calling freeze_array().
This calls flush_pending_writes() if it needs to sleep,
but some writes may be pending in a per-process plug rather
than in the per-array request queue.

When raid1{,0}_unplug() moves the request from the per-process
plug to the per-array request queue (from which
flush_pending_writes() can flush them), it needs to wake up
freeze_array(), or freeze_array() will never flush them and so
it will block forever.

So add the requires wake_up() calls.

This bug was introduced by commit
   f54a9d0e59c4bea3db733921ca9147612a6f292c
for raid1 and a similar commit for RAID10, and so has been present
since linux-3.6.  As the bug causes a deadlock I believe this fix is
suitable for -stable.

Cc: stable@vger.kernel.org (3.6.y 3.7.y 3.8.y)
Reported-by: Tregaron Bayly <tbayly@bluehost.com>
Tested-by: Tregaron Bayly <tbayly@bluehost.com>
Signed-off-by: NeilBrown <neilb@suse.de>
2013-02-26 11:58:50 +11:00
..
2012-03-28 18:41:29 +01:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:36 +00:00
2012-12-21 20:23:41 +00:00
2012-07-30 17:25:16 -07:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:38 +00:00
2012-12-21 20:23:41 +00:00
2013-01-31 14:11:14 +00:00
2012-12-21 20:23:41 +00:00
2012-12-21 20:23:41 +00:00
2013-01-31 14:23:36 +00:00
2012-12-21 20:23:38 +00:00
2012-10-22 10:44:55 +11:00
2012-10-11 13:08:44 +11:00
2012-12-18 09:32:44 -08:00
2012-12-18 09:32:44 -08:00
2012-10-11 13:49:05 +11:00