md: allow raid5_quiesce to work properly when reshape is happening.
authorNeilBrown <neilb@suse.de>
Mon, 3 Aug 2009 00:59:58 +0000 (10:59 +1000)
committerNeilBrown <neilb@suse.de>
Mon, 3 Aug 2009 00:59:58 +0000 (10:59 +1000)
commit64bd660b51b2da92e99a5e97349f6558349f11c5
treed35be79528dc8730b908e9d78357454ff22aee72
parente516402c0d4fc02be4af9fa8c18954d4f9deb44e
md: allow raid5_quiesce to work properly when reshape is happening.

The ->quiesce method is not supposed to stop resync/recovery/reshape,
just normal IO.
But in raid5 we don't have a way to know which stripes are being
used for normal IO and which for resync etc, so we need to wait for
all stripes to be idle to be sure that all writes have completed.

However reshape keeps at least some stripe busy for an extended period
of time, so a call to raid5_quiesce can block for several seconds
needlessly.
So arrange for reshape etc to pause briefly while raid5_quiesce is
trying to quiesce the array so that the active_stripes count can
drop to zero.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c