mirror of https://gitee.com/openkylin/linux.git
[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 <axboe@suse.de>
This commit is contained in:
parent
3ee68c4af3
commit
2cb2e147a6
|
@ -662,7 +662,7 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
|
||||||
* Enables a low level driver to set an upper limit on the size of
|
* Enables a low level driver to set an upper limit on the size of
|
||||||
* received requests.
|
* 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) {
|
if ((max_sectors << 9) < PAGE_CACHE_SIZE) {
|
||||||
max_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
|
max_sectors = 1 << (PAGE_CACHE_SHIFT - 9);
|
||||||
|
|
|
@ -392,8 +392,8 @@ struct request_queue
|
||||||
unsigned int nr_congestion_off;
|
unsigned int nr_congestion_off;
|
||||||
unsigned int nr_batching;
|
unsigned int nr_batching;
|
||||||
|
|
||||||
unsigned short max_sectors;
|
unsigned int max_sectors;
|
||||||
unsigned short max_hw_sectors;
|
unsigned int max_hw_sectors;
|
||||||
unsigned short max_phys_segments;
|
unsigned short max_phys_segments;
|
||||||
unsigned short max_hw_segments;
|
unsigned short max_hw_segments;
|
||||||
unsigned short hardsect_size;
|
unsigned short hardsect_size;
|
||||||
|
@ -697,7 +697,7 @@ extern request_queue_t *blk_init_queue(request_fn_proc *, spinlock_t *);
|
||||||
extern void blk_cleanup_queue(request_queue_t *);
|
extern void blk_cleanup_queue(request_queue_t *);
|
||||||
extern void blk_queue_make_request(request_queue_t *, make_request_fn *);
|
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_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_phys_segments(request_queue_t *, unsigned short);
|
||||||
extern void blk_queue_max_hw_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);
|
extern void blk_queue_max_segment_size(request_queue_t *, unsigned int);
|
||||||
|
|
Loading…
Reference in New Issue