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

Anton Eidelman anton.eidelman at gmail.com
Mon Sep 13 09:46:40 PDT 2021


On Mon, Sep 13, 2021 at 06:11:04PM +0200, Christoph Hellwig wrote:
> On Mon, Sep 13, 2021 at 09:07:56AM -0700, Keith Busch wrote:
> > I guess this works for the structures we have in place, but I think we
> > should replace the sorted list and with xarray. Then you can get
> > something simpler to follow like:
> 
> I guess that's fine for the short term.  It mean we'll have to walk
> the list for every namespace in the decriptor, but I've not actually
> seen deployments with crazy numbers of namespaces yet.

This is definitely a short term solution that does not require
us to change the data structures or address sorting at the end of scan_work.

I believe the impact of re-scanning desc->nsids will be minimal because
- It only happens when ana_work catches the namespaces list in a
  transient state with a few new namespaces appended
- The number of desc->nsids (one ANA group) should be much smaller
  than the total number of namespaces.

Thanks,
Anton



More information about the Linux-nvme mailing list