Re: [PATCH 2/2] scsi: enforce unlimited max_segment_size when virt_boundary_mask is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 23, 2025 at 03:03:27PM +0100, John Garry wrote:
> 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.

Oh, you're right - I thought we did the sht assignments in scsi_add_host.
So the changes would be fine.  But that also means we don't catch
conflicts added by the direct shost manipulation.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux