[PATCH v2 3/3] nvme/multipath: fix stale ana state for namespaces just added by scan work
Christoph Hellwig
hch at lst.de
Mon Sep 13 09:03:10 PDT 2021
On Mon, Sep 13, 2021 at 09:30:23AM -0600, Anton Eidelman wrote:
> Scan work initially adds new namespaces to ctrl->namespaces TAIL.
> They make the list unordered temporarily until nvme_scan_work()
> finally sorts the list.
>
> Solution:
> In order to preserve the way ctrl->namespaces is updated and sorted,
> make nvme_update_ana_state() deal with the case where ctrl->namespaces
> is not fully sorted and has new namespaces appended with potentially
> lower nsids.
> nvme_update_ana_state() keeps track of the nsid seen in the list,
> detects the unsorted case (rare), and restarts scanning of desc->nsids.
Can we dust off the patch from Chaitanya to switch to an always sorted
xarray instead of papering over this delayed sort?
More information about the Linux-nvme
mailing list