Re: [PATCH v1 0/2] dma: fix dma_opt_mapping_size() returning bogus value when no backend hint exists
From: John Garry
Date: Tue Mar 17 2026 - 11:19:57 EST
On 17/03/2026 14:36, Christoph Hellwig wrote:
On Tue, Mar 17, 2026 at 09:11:59AM +0000, John Garry wrote:
For SAS controllers, don't we limit shost->opt_sectors atThat assumes opt_xfer_blocks is actually set. It's an optional and
shost->max_sectors, and then in sd_revalidate_disk() this value is ignored
as sdkp->opt_xfer_blocks would be smaller, right?
relatively recent SCSI feature. So don't expect crappy SSDs or
RAID controllers faking up SCSI in shitty firmware to actually set
it.
Sure, and then we would have io_opt at max_sectors, and it seems that value is totally configurable for that HBA driver.
However I still find the values reported strange:
swidth=4095 / sunit=2
I thought that they were from io_opt and io_min, and blk_validate_limits() does rounding to PBS, except io_min has no rounding for > PBS.