Commit 9e78ac8
scsi: sd: Do not override max_sectors_kb sysfs setting
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>1 parent fc29713 commit 9e78ac8
1 file changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2878 | 2878 | | |
2879 | 2879 | | |
2880 | 2880 | | |
2881 | | - | |
2882 | | - | |
2883 | 2881 | | |
2884 | 2882 | | |
2885 | 2883 | | |
| |||
2894 | 2892 | | |
2895 | 2893 | | |
2896 | 2894 | | |
2897 | | - | |
| 2895 | + | |
2898 | 2896 | | |
2899 | 2897 | | |
2900 | 2898 | | |
| |||
2908 | 2906 | | |
2909 | 2907 | | |
2910 | 2908 | | |
2911 | | - | |
2912 | | - | |
| 2909 | + | |
| 2910 | + | |
| 2911 | + | |
| 2912 | + | |
| 2913 | + | |
| 2914 | + | |
| 2915 | + | |
| 2916 | + | |
| 2917 | + | |
| 2918 | + | |
| 2919 | + | |
| 2920 | + | |
| 2921 | + | |
2913 | 2922 | | |
2914 | 2923 | | |
2915 | 2924 | | |
| |||
0 commit comments