提交 5303e657 编写于 作者: J Jan Höppner 提交者: Martin Schwidefsky

s390/dasd: Make setting queue_max_segments more explicit

Currently the block queue value max_segments is set to -1L, which
is then implicitly casted to unsigned short in blk_queue_max_segments.
This results in 65535 (64k) max_segments.

Even though the resulting value is correct, setting it implicitly using
-1L is rather confusing. Set the value explicitly using the USHRT_MAX
macro instead.
Reviewed-by: NStefan Haberland <sth@linux.vnet.ibm.com>
Signed-off-by: NJan Höppner <hoeppner@linux.vnet.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 237d6e68
...@@ -3140,7 +3140,7 @@ static void dasd_setup_queue(struct dasd_block *block) ...@@ -3140,7 +3140,7 @@ static void dasd_setup_queue(struct dasd_block *block)
blk_queue_logical_block_size(block->request_queue, blk_queue_logical_block_size(block->request_queue,
block->bp_block); block->bp_block);
blk_queue_max_hw_sectors(block->request_queue, max); blk_queue_max_hw_sectors(block->request_queue, max);
blk_queue_max_segments(block->request_queue, -1L); blk_queue_max_segments(block->request_queue, USHRT_MAX);
/* with page sized segments we can translate each segement into /* with page sized segments we can translate each segement into
* one idaw/tidaw * one idaw/tidaw
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册