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

Christoph Hellwig hch at lst.de
Tue Sep 29 14:32:14 EDT 2020


On Tue, Sep 29, 2020 at 01:48:03AM -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.



More information about the Linux-nvme mailing list