diff options
author | Martin K. Petersen <martin.petersen@oracle.com> | 2010-10-13 21:18:03 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-03-21 12:43:39 -0700 |
commit | 43e069893c8749d04924e12cd81ce10c583ae6be (patch) | |
tree | 062dd1b5069a322371a38f4d743cdf66a633b904 | |
parent | 63676c6866f8d4711a44968c8247f59fdae1e287 (diff) |
block: Ensure physical block size is unsigned int
commit 892b6f90db81cccb723d5d92f4fddc2d68b206e1 upstream.
Physical block size was declared unsigned int to accomodate the maximum
size reported by READ CAPACITY(16). Make sure we use the right type in
the related functions.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | block/blk-settings.c | 2 | ||||
-rw-r--r-- | include/linux/blkdev.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c index 5eeb9e0d256..bda7d1587ca 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -356,7 +356,7 @@ EXPORT_SYMBOL(blk_queue_logical_block_size); * hardware can operate on without reverting to read-modify-write * operations. */ -void blk_queue_physical_block_size(struct request_queue *q, unsigned short size) +void blk_queue_physical_block_size(struct request_queue *q, unsigned int size) { q->limits.physical_block_size = size; diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 1896e868854..3b1df7260f3 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -926,7 +926,7 @@ extern void blk_queue_max_segment_size(struct request_queue *, unsigned int); extern void blk_queue_max_discard_sectors(struct request_queue *q, unsigned int max_discard_sectors); extern void blk_queue_logical_block_size(struct request_queue *, unsigned short); -extern void blk_queue_physical_block_size(struct request_queue *, unsigned short); +extern void blk_queue_physical_block_size(struct request_queue *, unsigned int); extern void blk_queue_alignment_offset(struct request_queue *q, unsigned int alignment); extern void blk_limits_io_min(struct queue_limits *limits, unsigned int min); @@ -1077,7 +1077,7 @@ static inline unsigned int queue_physical_block_size(struct request_queue *q) return q->limits.physical_block_size; } -static inline int bdev_physical_block_size(struct block_device *bdev) +static inline unsigned int bdev_physical_block_size(struct block_device *bdev) { return queue_physical_block_size(bdev_get_queue(bdev)); } |