On 23/06/2025 14:35, Christoph Hellwig wrote:
On Mon, Jun 23, 2025 at 09:37:10AM +0100, John Garry wrote:
- 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_mask
I 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.