diff options
author | Raz Ben-Jehuda(caro) <raziebe@gmail.com> | 2006-12-10 02:20:48 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-10 09:57:20 -0800 |
commit | 5248861511d6aae4997a5aa7152824d87587b0b6 (patch) | |
tree | a853392a6ca8fdb10a308e46b90e4ed63e66bf04 /drivers/md | |
parent | 46031f9a38a9773021f1872abc713d62467ac22e (diff) | |
download | blackbird-op-linux-5248861511d6aae4997a5aa7152824d87587b0b6.tar.gz blackbird-op-linux-5248861511d6aae4997a5aa7152824d87587b0b6.zip |
[PATCH] md: enable bypassing cache for reads
Call the chunk_aligned_read where appropriate.
Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/raid5.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 2ac2e56a1a40..2e676e33744c 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; |