[RFC-PATCH 1/2] nvme-multipath: delete gendisk under subsys lock

Hannes Reinecke hare at suse.de
Mon Mar 2 23:29:27 PST 2026


On 3/2/26 23:25, Keith Busch wrote:
> From: Keith Busch <kbusch at kernel.org>
> 
> To maintain symmetry with the disk add side, perform the disk deletion
> under the nvme subsystem lock. This will ensure consistent ordering of
> device naming when adding namespaces while concurrently deleting stale
> references.
> 
> The deferred removal requires special attention to the nvme_subsystem:
> the head may be holding the final reference in the deferred path, so
> take a reference on it while removing the head.
> 
> Signed-off-by: Keith Busch <kbusch at kernel.org>
> ---
>   drivers/nvme/host/core.c      |  3 +--
>   drivers/nvme/host/multipath.c | 28 +++++++++++-----------------
>   drivers/nvme/host/nvme.h      |  1 +
>   3 files changed, 13 insertions(+), 19 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare at suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare at suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich



More information about the Linux-nvme mailing list