[PATCH 10/20] nvme: freeze the queue over ->lba_shift updates

Christoph Hellwig hch at lst.de
Mon Oct 5 04:32:20 EDT 2020


On Fri, Oct 02, 2020 at 09:03:26AM -0700, Sagi Grimberg wrote:
>
>>>>> Ensure that there can't be any I/O in flight went we change the disk
>>>>> geometry in nvme_update_ns_info, most notable the LBA size by lifting
>>>>> the queue free from nvme_update_disk_info into the caller
>>>>
>>>> The queue is frozen on the queue logical block size, why should
>>>> we care about I/O while ns->lba_shift?
>>>
>>> Because we use it for all kinds of calculations in the I/O path.  By
>>> moving all assignments into the frozen queue critical sections we
>>> avoid all possibly inconsistencies.
>>
>> I'd think that it would be better to never use ns->lba_shift but rather
>> the request queue block size and keep the queue freeze span only
>> that mutation.
>
> ?

So that we'll need to multiply instead of shift in the I/O path?
Maybe we could add a shift in the queue, but that's a much bigger
change..



More information about the Linux-nvme mailing list