Commit a5c308d4 authored by NeilBrown's avatar NeilBrown

md/raid5: suspend shouldn't affect read requests.

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.

Cc: stable@kernel.org
Signed-off-by: default avatarNeilBrown <neilb@suse.de>
parent 0909dc44
...@@ -3702,7 +3702,8 @@ static int make_request(struct request_queue *q, struct bio * bi) ...@@ -3702,7 +3702,8 @@ static int make_request(struct request_queue *q, struct bio * bi)
/* FIXME what if we get a false positive because these /* FIXME what if we get a false positive because these
* are being updated. * 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) { logical_sector < mddev->suspend_hi) {
release_stripe(sh); release_stripe(sh);
schedule(); schedule();
......
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