[PATCH v2 3/3] nvme/multipath: fix stale ana state for namespaces just added by scan work

Keith Busch kbusch at kernel.org
Tue Sep 14 07:24:36 PDT 2021


On Tue, Sep 14, 2021 at 08:30:52AM +0200, Christoph Hellwig wrote:
> On Tue, Sep 14, 2021 at 09:24:30AM +0300, Sagi Grimberg wrote:
> > I agree it should not happen with xarray as inserts preserve sorting,
> > but that patch has the non-trivial removal of the namespaces_rwsem which
> > synchronizes in a lot in a lot of error recovery flows. It's very
> > possible that xarray will introduce regressions.
> 
> I've actually started looking over the series earlier today, and staring
> it I'm pretty sure the namespaces_rwsem is completely broken.  There
> is nothing preventing the namespaces from going away in these loops.
> 
> But I can't see why we don't just always do a sorted insertation into
> the ->namespaces list.  Just trying to figure out the history of the
> delayed sort ATM.

There doesn't appear to be any reason for the delayed list sort. It
looks correct to do a ordered list insert from the beginning.



More information about the Linux-nvme mailing list