From: NeilBrown Date: Wed, 1 Jul 2009 03:15:35 +0000 (+1000) Subject: md/raid5: suspend shouldn't affect read requests. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=a5c308d4d1659b1f4833b863394e3e24cdbdfc6e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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) /* 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();