[PATCHv3] nvme-mpath: delete disk after last connection
Sagi Grimberg
sagi at grimberg.me
Fri May 7 18:20:17 BST 2021
>>> PCI and fabrics have different defaults; for PCI the device goes away if
>>> the last path (ie the controller) goes away, for fabrics it doesn't
>>> if the
>>> device is mounted.
>>
>> Err, no. For fabrics we reconnect a while, but otherwise the behavior
>> is the same right now.
>>
> No, that is not the case.
>
> When a PCI nvme device with CMIC=0 is removed (via pci hotplug, say),
> the nvme device is completely removed, irrespective on whether it's
> mounted or not.
> When the _same_ PCI device with CMIC=1 is removed, the nvme device (ie
> the nsnhead) will _stay_ when mounted (as the refcount is not zero).
>
> This can be easily demonstrated on qemu; just set the 'subsys' parameter
> for the nvme device.
Perhaps we need to fix the issue and allow the existing behavior by
having an explicit queue_if_no_path argument.
More information about the Linux-nvme
mailing list