Skip to content

Commit 62baf70

Browse files
Hannes ReineckeChristoph Hellwig
authored andcommitted
nvme: re-read ANA log page after ns scan completes
When scanning for new namespaces we might have missed an ANA AEN. The NVMe base spec (NVMe Base Specification v2.1, Figure 151 'Asynchonous Event Information - Notice': Asymmetric Namespace Access Change) states: A controller shall not send this even if an Attached Namespace Attribute Changed asynchronous event [...] is sent for the same event. so we need to re-read the ANA log page after we rescanned the namespace list to update the ANA states of the new namespaces. Signed-off-by: Hannes Reinecke <[email protected]> Reviewed-by: Keith Busch <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
1 parent 9546ad1 commit 62baf70

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/nvme/host/core.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4299,6 +4299,11 @@ static void nvme_scan_work(struct work_struct *work)
42994299
/* Requeue if we have missed AENs */
43004300
if (test_bit(NVME_AER_NOTICE_NS_CHANGED, &ctrl->events))
43014301
nvme_queue_scan(ctrl);
4302+
#ifdef CONFIG_NVME_MULTIPATH
4303+
else
4304+
/* Re-read the ANA log page to not miss updates */
4305+
queue_work(nvme_wq, &ctrl->ana_work);
4306+
#endif
43024307
}
43034308

43044309
/*

0 commit comments

Comments
 (0)