mbox series

[v3,0/2] Improve optimal IO size initialization

Message ID 20250612060211.1970933-1-dlemoal@kernel.org
Headers show
Series Improve optimal IO size initialization | expand

Message

Damien Le Moal June 12, 2025, 6:02 a.m. UTC
A couple of patches to improve setting the optimal I/O size limit of
scsi disks. A fallback default is added to make sure we always have a
non-zero optimal I/O size so that file systems operate with a
reasonnably sized default read_ahead_kb value, for improving buffered
read performance.

Changes from v1:
 - Changed message level from wrong WARNING level to INFO level
 - Added review tag

Changes from v2:
 - Added patch 1
 - Make sure we do not overflow variables and limits in patch 2

Damien Le Moal (2):
  scsi: sd: Prevent logical_to_bytes() from returning overflowed values
  scsi: sd: Set a default optimal IO size if one is not defined

 drivers/scsi/sd.c | 45 +++++++++++++++++++++++++++++++++++----------
 drivers/scsi/sd.h |  2 +-
 2 files changed, 36 insertions(+), 11 deletions(-)