summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorMartin K. Petersen <martin.petersen@oracle.com>2015-06-23 19:13:59 +0300
committerSasha Levin <sasha.levin@oracle.com>2015-09-17 08:30:44 +0300
commit20d74bf29cfae86649bf1ec75038c79a9bc5010f (patch)
treee7e382c6e48022004f58a05da93133f9a5d3a34d /block
parent20b38ab5b687df3dbb873cfb0efa946a021f890a (diff)
downloadlinux-20d74bf29cfae86649bf1ec75038c79a9bc5010f.tar.xz
sd: Fix maximum I/O size for BLOCK_PC requests
[ Upstream commit 4f258a46346c03fa0bbb6199ffaf4e1f9f599660 ] Commit bcdb247c6b6a ("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> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-settings.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/blk-settings.c b/block/blk-settings.c
index aa02247d227e..d15c34a31633 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -241,8 +241,8 @@ EXPORT_SYMBOL(blk_queue_bounce_limit);
* Description:
* Enables a low level driver to set a hard upper limit,
* max_hw_sectors, on the size of requests. max_hw_sectors is set by
- * the device driver based upon the combined capabilities of I/O
- * controller and storage device.
+ * the device driver based upon the capabilities of the I/O
+ * controller.
*
* max_sectors is a soft limit imposed by the block layer for
* filesystem type requests. This value can be overridden on a