]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
nvme: re-read ANA log page after ns scan completes
authorHannes Reinecke <hare@kernel.org>
Thu, 3 Apr 2025 07:19:30 +0000 (09:19 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 May 2025 05:50:58 +0000 (07:50 +0200)
commit60ed102378a31f423e19b16f03439b60be489b37
tree124dc9e78d7d4f8887b44ec8aee9a5c353c8cedf
parent4c97ba1b0b98cec6d5759048d3b4509428be12ba
nvme: re-read ANA log page after ns scan completes

[ Upstream commit 62baf70c327444338c34703c71aa8cc8e4189bd6 ]

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 <hare@kernel.org>
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/nvme/host/core.c