Re: [PATCH 2/2] scsi: enforce unlimited max_segment_size when virt_boundary_mask is set
From: John Garry <john.g.garry@oracle.com>
Date: 2025-06-23 14:04:01
Also in:
linux-rdma, linux-scsi
From: John Garry <john.g.garry@oracle.com>
Date: 2025-06-23 14:04:01
Also in:
linux-rdma, linux-scsi
On 23/06/2025 14:35, Christoph Hellwig wrote:
On Mon, Jun 23, 2025 at 09:37:10AM +0100, John Garry wrote:quoted
quoted
- else - shost->max_segment_size = BLK_MAX_SEGMENT_SIZE; + if (sht->virt_boundary_mask) + shost->virt_boundary_mask = sht->virt_boundary_mask;nit: you could just always set shost->virt_boundary_mask = sht->virt_boundary_maskI could, but it would change behavior and break drivers. The SCSI midlayer allows overriding the template provided values in the host itself after allocating and before adding it. For the virt_boundary_mask that features is used by iser and srp.
Since shost is zero-init'ed, I did not think that my suggestion for this minor simplification in scsi_host_alloc() logically changes anything.