public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/1] Fix unaligned queue_limit->io_opt on SAS and 4KN disk
@ 2025-11-14 10:28 Lukas Herbolt
  2025-11-14 10:28 ` [PATCH 1/1] scsi: sd: Rounddown host->opt_sectors to logical Lukas Herbolt
  0 siblings, 1 reply; 6+ messages in thread
From: Lukas Herbolt @ 2025-11-14 10:28 UTC (permalink / raw)
  To: James.Bottomley, martin.petersen; +Cc: linux-scsi, Lukas Herbolt

If there is an SAS attached disk we set the SCSI host opt_sectors in 
sas_host_setup() to either dma_opt_mapping_size() or host->max_sectors 
this value can be later assigned to the device queue_limit as io_opt, but 
there is no further check if the io_opt is aligned with the device limits.

Rounding down to device logical_sectors will keep the io_opt large enough 
to keep benefit of bigger IO but still aligned within the device limits. 

Lukas Herbolt (1):
  scsi: sd: Rounddown host->opt_sectors to logical sectors reported by
    the disk.

 drivers/scsi/sd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.51.1


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-11-21  8:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-14 10:28 [PATCH 0/1] Fix unaligned queue_limit->io_opt on SAS and 4KN disk Lukas Herbolt
2025-11-14 10:28 ` [PATCH 1/1] scsi: sd: Rounddown host->opt_sectors to logical Lukas Herbolt
2025-11-20  3:26   ` Martin K. Petersen
2025-11-20 12:07     ` lukas
2025-11-20 16:07     ` John Garry
2025-11-21  8:34       ` lukas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox