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

Sagi Grimberg sagi at grimberg.me
Tue Sep 29 15:07:10 EDT 2020


>>> 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.



More information about the Linux-nvme mailing list