[PATCH 11/17] nvme-pci: don't unquiesce the I/O queues in nvme_remove_dead_ctrl

Chao Leng lengchao at huawei.com
Wed Oct 26 19:46:29 PDT 2022



On 2022/10/26 20:58, Sagi Grimberg wrote:
> 
>>> nvme_remove_dead_ctrl schedules nvme_remove to be called, which will
>>> call nvme_dev_disable and unquiesce the I/O queues.
>>>
>>> Signed-off-by: Christoph Hellwig <hch at lst.de>
>>> ---
>>>   drivers/nvme/host/pci.c | 1 -
>>>   1 file changed, 1 deletion(-)
>>>
>>> diff --git a/drivers/nvme/host/pci.c b/drivers/nvme/host/pci.c
>>> index bef98f6e1396c..3a26c9b2bf454 100644
>>> --- a/drivers/nvme/host/pci.c
>>> +++ b/drivers/nvme/host/pci.c
>>> @@ -2794,7 +2794,6 @@ static void nvme_remove_dead_ctrl(struct nvme_dev *dev)
>>>       nvme_get_ctrl(&dev->ctrl);
>>>       nvme_dev_disable(dev, false);
>> Currently set the parameter "shutdown" to false, nvme_dev_disable() do not unquiesce the queues.
>> Actually we should set the parameter "shutdown" to true.
>>          nvme_dev_disable(dev, true);
> 
> But the final put will trigger nvme_remove no?
No, it do not trigger nvme_remove.
However, the controller is actually in deleting state.
Unquiescing the queues seems to be the better choice here.



More information about the Linux-nvme mailing list