summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-07-01 13:15:35 +1000
committerGreg Kroah-Hartman <gregkh@suse.de>2009-07-19 20:38:52 -0700
commit5de149123be72b438c5651ac8ca53223ca05a714 (patch)
treed0ab70a07e76d0fca1692ba7fecf6ebc44979f07
parent6891897d22e3df3417f451f5fb921cb9562539e7 (diff)
md/raid5: suspend shouldn't affect read requests.
commit a5c308d4d1659b1f4833b863394e3e24cdbdfc6e upstream. md allows write to regions on an array to be suspended temporarily. This allows user-space to participate is aspects of reshape. In particular, data can be copied with not risk of a race. We should not be blocking read requests though, so don't. Signed-off-by: NeilBrown <neilb@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--drivers/md/raid5.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index c0434e0b72ac..1f98ea4b1345 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3703,7 +3703,8 @@ static int make_request(struct request_queue *q, struct bio * bi)
/* FIXME what if we get a false positive because these
* are being updated.
*/
- if (logical_sector >= mddev->suspend_lo &&
+ if (bio_data_dir(bi) == WRITE &&
+ logical_sector >= mddev->suspend_lo &&
logical_sector < mddev->suspend_hi) {
release_stripe(sh);
schedule();