Re: [PATCH RFC] nvme-multipath: don't retry adding head disk
Christoph Hellwig <[email protected]> Thu, 30 Jul 2026 13:40:09 +0200
| Newsgroups | org.infradead.lists.linux-nvme |
|---|---|
| Message-ID | <[email protected]> |
On Wed, Jul 29, 2026 at 06:22:35PM +0000, John Garry wrote: > From: John Garry <[email protected]> > > If an attempt to add the head disk in nvme_mpath_set_live() -> > device_add_disk() fails, then flag NVME_NSHEAD_DISK_LIVE is cleared and > we bail out. > > However, we may later call nvme_mpath_set_live() -> device_add_disk() again > for another NS or from ANA updates for the same NS. This is broken, as we > should not retry adding the disk - it breaks the driver model. > > Add a flag NVME_NSHEAD_DISK_BROKEN to stop this happening. > > Signed-off-by: John Garry <[email protected]> > --- > I'm not happy with this solution, as we have a DOA disk and it would be > better to remove the NSes in this case. OTOH, this device_add_disk() > failure is very unlikely to happen, so we should not add a complex > solution to handle it. Yeah. Broken is a bit weird of a name for something that would either be a logic bug or a really messed up kernel, though. I guess you arrive there by error injection?