]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/scsi/sd.c
scsi: sd: Do not override max_sectors_kb sysfs setting
authorMartin K. Petersen <martin.petersen@oracle.com>
Thu, 28 Sep 2017 01:38:59 +0000 (21:38 -0400)
committerSeth Forshee <seth.forshee@canonical.com>
Thu, 19 Oct 2017 14:49:16 +0000 (09:49 -0500)
commit330587e823685a87e8bcd52a4afdc0fb32f6f8b0
tree2e6c76b4224d8cf3c48444489204ad18d048747a
parentba3d3d9f11500fa560244f36bd9485aceec0e0d7
scsi: sd: Do not override max_sectors_kb sysfs setting

BugLink: http://bugs.launchpad.net/bugs/1723145
commit 77082ca503bed061f7fbda7cfd7c93beda967a41 upstream.

A user may lower the max_sectors_kb setting in sysfs to accommodate
certain workloads. Previously we would always set the max I/O size to
either the block layer default or the optional preferred I/O size
reported by the device.

Keep the current heuristics for the initial setting of max_sectors_kb.
For subsequent invocations, only update the current queue limit if it
exceeds the capabilities of the hardware.

Reported-by: Don Brace <don.brace@microsemi.com>
Reviewed-by: Martin Wilck <mwilck@suse.com>
Tested-by: Don Brace <don.brace@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/sd.c