From: Raz Ben-Jehuda(caro) Date: Sun, 10 Dec 2006 10:20:48 +0000 (-0800) Subject: [PATCH] md: enable bypassing cache for reads X-Git-Tag: v2.6.20-rc1~145^2~27 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5248861511d6aae4997a5aa7152824d87587b0b6;p=linux-2.6 [PATCH] md: enable bypassing cache for reads Call the chunk_aligned_read where appropriate. Signed-off-by: Neil Brown Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2ac2e56a1a..2e676e3374 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2808,6 +2808,11 @@ static int make_request(request_queue_t *q, struct bio * bi) disk_stat_inc(mddev->gendisk, ios[rw]); disk_stat_add(mddev->gendisk, sectors[rw], bio_sectors(bi)); + if (bio_data_dir(bi) == READ && + mddev->reshape_position == MaxSector && + chunk_aligned_read(q,bi)) + return 0; + logical_sector = bi->bi_sector & ~((sector_t)STRIPE_SECTORS-1); last_sector = bi->bi_sector + (bi->bi_size>>9); bi->bi_next = NULL;