[PATCHv3] nvme-mpath: delete disk after last connection

Christoph Hellwig hch at lst.de
Mon May 10 07:23:46 BST 2021


On Fri, May 07, 2021 at 07:02:52PM +0200, Hannes Reinecke wrote:
> On 5/7/21 8:46 AM, Christoph Hellwig wrote:
>> On Thu, May 06, 2021 at 05:54:29PM +0200, Hannes Reinecke wrote:
>>> 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).

Yes.  But that has nothing to do with fabrics as you claimed above, but
with the fact if the subsystem supports multiple controller (and thus
shared namespaces) or not.



More information about the Linux-nvme mailing list