]> git.baikalelectronics.ru Git - kernel.git/commit
sd: Fix maximum I/O size for BLOCK_PC requests
authorMartin K. Petersen <martin.petersen@oracle.com>
Tue, 23 Jun 2015 16:13:59 +0000 (12:13 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Wed, 12 Aug 2015 18:54:37 +0000 (11:54 -0700)
commit1b1e32e33487c9efcdb36655b71c514e0dfd1bc2
tree87f6203edaaa3e9156c5f1710427a1915195e98e
parent9df6eda9c57e5c5f5b3d4719e5a9f293784e4913
sd: Fix maximum I/O size for BLOCK_PC requests

Commit b7bb22bd5428 ("sd: Limit transfer length") clamped the maximum
size of an I/O request to the MAXIMUM TRANSFER LENGTH field in the BLOCK
LIMITS VPD. This had the unfortunate effect of also limiting the maximum
size of non-filesystem requests sent to the device through sg/bsg.

Avoid using blk_queue_max_hw_sectors() and set the max_sectors queue
limit directly.

Also update the comment in blk_limits_max_hw_sectors() to clarify that
max_hw_sectors defines the limit for the I/O controller only.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reported-by: Brian King <brking@linux.vnet.ibm.com>
Tested-by: Brian King <brking@linux.vnet.ibm.com>
Cc: stable@vger.kernel.org # 3.17+
Signed-off-by: James Bottomley <JBottomley@Odin.com>
block/blk-settings.c
drivers/scsi/sd.c