The patch titled Direct I/O bio size regression fix has been added to the -mm tree. Its filename is direct-i-o-bio-size-regression-fix.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this From: David Chinner <dgc@xxxxxxx> The change introduced here in 2.6.15: http://kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=defd94b75409b983f94548ea2f52ff5787ddb848 sets the request queue max_sector size unconditionally to 1024 sectors in blk_queue_max_sectors() even if the underlying hardware can support a larger number of sectors. Hence when building direct I/O bios, we have the situation where: - dio_new_bio() limits bio vector size artifically to 1024 sectors / page size because bio_get_nr_vecs() is used q->max_sectors to size the new bio; and - dio_bio_add_page() limits the total bio size to 1024 sectors because bio_add_page() now uses q->max_sectors to limit the size of the bio. Therefore, we can't build direct I/Os larger than 1024 sectors even if the hardware supports large I/Os. This is a regression as before this mod we were able to issue direct I/Os limited by either the maximum number of vectors in an bio or the hardware limits. The patch allows direct I/O to build bios as large as the underlying hardware will allow. Signed-off-by: Dave Chinner <dgc@xxxxxxx> Cc: <stable@xxxxxxxxxx> Cc: Jens Axboe <axboe@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/bio.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff -puN fs/bio.c~direct-i-o-bio-size-regression-fix fs/bio.c --- 25/fs/bio.c~direct-i-o-bio-size-regression-fix Mon Apr 24 15:56:45 2006 +++ 25-akpm/fs/bio.c Mon Apr 24 15:56:45 2006 @@ -305,7 +305,7 @@ int bio_get_nr_vecs(struct block_device request_queue_t *q = bdev_get_queue(bdev); int nr_pages; - nr_pages = ((q->max_sectors << 9) + PAGE_SIZE - 1) >> PAGE_SHIFT; + nr_pages = ((q->max_hw_sectors << 9) + PAGE_SIZE - 1) >> PAGE_SHIFT; if (nr_pages > q->max_phys_segments) nr_pages = q->max_phys_segments; if (nr_pages > q->max_hw_segments) @@ -447,7 +447,7 @@ int bio_add_page(struct bio *bio, struct unsigned int offset) { struct request_queue *q = bdev_get_queue(bio->bi_bdev); - return __bio_add_page(q, bio, page, len, offset, q->max_sectors); + return __bio_add_page(q, bio, page, len, offset, q->max_hw_sectors); } struct bio_map_data { _ Patches currently in -mm which might be from dgc@xxxxxxx are direct-i-o-bio-size-regression-fix.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html