Skip to content

Commit

Permalink
[PATCH] md: enable bypassing cache for reads
Browse files Browse the repository at this point in the history
Call the chunk_aligned_read where appropriate.

Signed-off-by: Neil Brown <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
raziebe authored and Linus Torvalds committed Dec 10, 2006
1 parent 46031f9 commit 5248861
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/md/raid5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5248861

Please sign in to comment.