md/raid10: call wait_barrier() for each request submitted.
authorNeilBrown <neilb@suse.de>
Mon, 5 May 2014 03:34:37 +0000 (13:34 +1000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jun 2014 17:28:12 +0000 (10:28 -0700)
commit8c7311a1c4a8d804bde91b00a2f2c1a22a954c30
treed0457729f885cfa730990a165e11bec56dacc33b
parentf9556c35b5b7ce5b50a0490c2b93c88af92df648
md/raid10: call wait_barrier() for each request submitted.

commit cc13b1d1500656a20e41960668f3392dda9fa6e2 upstream.

wait_barrier() includes a counter, so we must call it precisely once
(unless balanced by allow_barrier()) for each request submitted.

Since
commit 20d0189b1012a37d2533a87fb451f7852f2418d1
    block: Introduce new bio_split()
in 3.14-rc1, we don't call it for the extra requests generated when
we need to split a bio.

When this happens the counter goes negative, any resync/recovery will
never start, and  "mdadm --stop" will hang.

Reported-by: Chris Murphy <lists@colorremedies.com>
Fixes: 20d0189b1012a37d2533a87fb451f7852f2418d1
Cc: Kent Overstreet <kmo@daterainc.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/md/raid10.c