[PATCH v2 1/2] nvmet-passthru: Limit mdts by BIO_MAX_PAGES

Logan Gunthorpe logang at deltatee.com
Mon Oct 19 22:05:36 EDT 2020



On 2020-10-19 8:03 p.m., Chaitanya Kulkarni wrote:
> On 10/19/20 08:40, Logan Gunthorpe wrote:
>>>> +	max_hw_sectors = min_not_zero(BIO_MAX_PAGES << (PAGE_SHIFT - 9),
>>>> +				      max_hw_sectors);
>>> can 9 be replaced with SECTOR_SHIFT ?
>> Oh, yes, that does sound better. Thanks.
>>
>> Logan
>>
>>
> Although it is a good suggestion we are not using the SECTOR_SIZE in
> 
> the target code, I don't think we should change that for passthru. Also,
> 
> I remember that on the block layer mailing list SECTOR_SIZE macro been
> 
> discouraged over use of 9.

Well in that case v2 or v3 can be merged depending on maintainer preference.

Logan



More information about the Linux-nvme mailing list