[PATCH] nvme: re-read ANA log on NS CHANGED AEN

Keith Busch kbusch at kernel.org
Fri Dec 4 12:37:13 EST 2020


On Fri, Dec 04, 2020 at 05:32:21PM +0100, Hannes Reinecke wrote:
> On 12/4/20 4:20 PM, Keith Busch wrote:
> > The scan work can be started from other contexts too, so there are some
> > unfortunate races here if one of those other contexts clears ctrl->events
> > before the ANA work gets to see it, which then gets you back to having
> > unusable namespaces when that scan work uses a stale ana log.
> > 
> Maybe this on top?

It does shrink the race, but doesn't eliminate it if scan work starts
after the bit is set in ctrl->events, but before the ana work is queued.

I've another question, though. You mentioned this approach for recovery
reasons. Whether you read the ana log here or where I suggested, there's
no recovery occuring if the ana log read fails: your patch just queues
the scan work that won't find the matching ana group id, which is the
same result if refreshing the ana log inline with the namespace scan
also fails. Is their a difference I'm not seeing?



More information about the Linux-nvme mailing list