diff options
author | NeilBrown <neilb@suse.de> | 2009-06-30 23:15:35 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2009-06-30 23:15:35 -0400 |
commit | a5c308d4d1659b1f4833b863394e3e24cdbdfc6e (patch) | |
tree | 6affde6f3f03c01f651210cc042a07ba70533d03 /drivers/md/raid5.c | |
parent | 0909dc448c98ed5021c87ffdfc09fb473aa464ab (diff) |
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: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r-- | drivers/md/raid5.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 92ef9b6abfc7..1f444ae07f89 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c | |||
@@ -3702,7 +3702,8 @@ static int make_request(struct request_queue *q, struct bio * bi) | |||
3702 | /* FIXME what if we get a false positive because these | 3702 | /* FIXME what if we get a false positive because these |
3703 | * are being updated. | 3703 | * are being updated. |
3704 | */ | 3704 | */ |
3705 | if (logical_sector >= mddev->suspend_lo && | 3705 | if (bio_data_dir(bi) == WRITE && |
3706 | logical_sector >= mddev->suspend_lo && | ||
3706 | logical_sector < mddev->suspend_hi) { | 3707 | logical_sector < mddev->suspend_hi) { |
3707 | release_stripe(sh); | 3708 | release_stripe(sh); |
3708 | schedule(); | 3709 | schedule(); |