GIT 1a50c08195d988eef183c9a64c4567c5d3daf133 git+ssh://master.kernel.org/pub/scm/linux/kernel/git/axboe/linux-2.6-block.git#for-linus commit 1a50c08195d988eef183c9a64c4567c5d3daf133 Author: Jens Axboe Date: Tue Jan 17 11:09:27 2006 +0100 [BLOCK] ll_rw_blk: use preempt-disabling disk_stat_add() in completion It can legally be called with interrupts/preemption enabled. Signed-off-by: Jens Axboe commit bdeb59f0fee2ec1cceb509afed35041bcd733a4b Author: Jens Axboe Date: Tue Jan 17 09:04:32 2006 +0100 [BLOCK] ll_rw_blk: make max_sectors and max_hw_sectors unsigned ints IDE lba48 can support full 64k request size, which overflows the max_hw_sectors variable. Signed-off-by: Jens Axboe Index: linux-2.6.16-rc1/block/ll_rw_blk.c =================================================================== --- linux-2.6.16-rc1.orig/block/ll_rw_blk.c 2006-01-23 21:22:23.000000000 +0000 +++ linux-2.6.16-rc1/block/ll_rw_blk.c 2006-02-22 20:43:50.000000000 +0000 @@ -662,7 +662,7 @@ EXPORT_SYMBOL(blk_queue_bounce_limit); * Enables a low level driver to set an upper limit on the size of * received requests. **/ -void blk_queue_max_sectors(request_queue_t *q, unsigned short max_sectors) +void blk_queue_max_sectors(request_queue_t *q, unsigned int max_sectors) { if ((max_sectors << 9) < PAGE_CACHE_SIZE) { max_sectors = 1 << (PAGE_CACHE_SHIFT - 9); @@ -3155,7 +3155,7 @@ static int __end_that_request_first(stru if (blk_fs_request(req) && req->rq_disk) { const int rw = rq_data_dir(req); - __disk_stat_add(req->rq_disk, sectors[rw], nr_bytes >> 9); + disk_stat_add(req->rq_disk, sectors[rw], nr_bytes >> 9); } total_bytes = bio_nbytes = 0; Index: linux-2.6.16-rc1/include/linux/blkdev.h =================================================================== --- linux-2.6.16-rc1.orig/include/linux/blkdev.h 2006-01-17 07:44:47.000000000 +0000 +++ linux-2.6.16-rc1/include/linux/blkdev.h 2006-02-22 20:43:50.000000000 +0000 @@ -392,8 +392,8 @@ struct request_queue unsigned int nr_congestion_off; unsigned int nr_batching; - unsigned short max_sectors; - unsigned short max_hw_sectors; + unsigned int max_sectors; + unsigned int max_hw_sectors; unsigned short max_phys_segments; unsigned short max_hw_segments; unsigned short hardsect_size; @@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(r extern void blk_cleanup_queue(request_queue_t *); extern void blk_queue_make_request(request_queue_t *, make_request_fn *); extern void blk_queue_bounce_limit(request_queue_t *, u64); -extern void blk_queue_max_sectors(request_queue_t *, unsigned short); +extern void blk_queue_max_sectors(request_queue_t *, unsigned int); extern void blk_queue_max_phys_segments(request_queue_t *, unsigned short); extern void blk_queue_max_hw_segments(request_queue_t *, unsigned short); extern void blk_queue_max_segment_size(request_queue_t *, unsigned int); Index: linux-2.6.16-rc1/include/linux/device-mapper.h =================================================================== --- linux-2.6.16-rc1.orig/include/linux/device-mapper.h 2006-02-22 20:43:13.000000000 +0000 +++ linux-2.6.16-rc1/include/linux/device-mapper.h 2006-02-22 20:43:50.000000000 +0000 @@ -91,7 +91,7 @@ struct target_type { }; struct io_restrictions { - unsigned short max_sectors; + unsigned int max_sectors; unsigned short max_phys_segments; unsigned short max_hw_segments; unsigned short hardsect_size; Index: linux-2.6.16-rc1/drivers/md/dm-table.c =================================================================== --- linux-2.6.16-rc1.orig/drivers/md/dm-table.c 2006-02-22 20:43:13.000000000 +0000 +++ linux-2.6.16-rc1/drivers/md/dm-table.c 2006-02-22 20:43:50.000000000 +0000 @@ -508,7 +508,7 @@ int dm_get_device(struct dm_target *ti, if (q->merge_bvec_fn) rs->max_sectors = min_not_zero(rs->max_sectors, - (unsigned short)(PAGE_SIZE >> 9)); + (unsigned int) (PAGE_SIZE >> 9)); rs->max_phys_segments = min_not_zero(rs->max_phys_segments,