All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: drop WARN_ON() when processing ANA AEN
@ 2018-07-26 10:57 Hannes Reinecke
  2018-07-26 15:10 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Hannes Reinecke @ 2018-07-26 10:57 UTC (permalink / raw)


We might be receiving ANA AENs at any time, so it might happen that
we're receiving an ANA AEN even before we have processed all ANA
information.
But this is nothing to worry about, and we can safely drop the
WARN_ON here.

Patch is relative to hchs nvme-ana tree.

Signed-off-by: Hannes Reinecke <hare at suse.com>
---
 drivers/nvme/host/core.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 39bdfe806d1b..3b96ace1f86d 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -3382,10 +3382,11 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)
 		break;
 #ifdef CONFIG_NVME_MULTIPATH
 	case NVME_AER_NOTICE_ANA:
-		if (WARN_ON_ONCE(!ctrl->ana_log_buf))
+		if (ctrl->ana_log_buf) {
+			queue_work(nvme_wq, &ctrl->ana_work);
 			break;
-		queue_work(nvme_wq, &ctrl->ana_work);
-		break;
+		}
+		dev_warn(ctrl->device, "ANA disabled, skipping AEN\n");
 #endif
 	default:
 		dev_warn(ctrl->device, "async event result %08x\n", result);
-- 
2.12.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH] nvme: drop WARN_ON() when processing ANA AEN
  2018-07-26 10:57 [PATCH] nvme: drop WARN_ON() when processing ANA AEN Hannes Reinecke
@ 2018-07-26 15:10 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2018-07-26 15:10 UTC (permalink / raw)


I've just manually removed the WARN_ONs here and in nvme_failover_req,
thanks!

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-07-26 15:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26 10:57 [PATCH] nvme: drop WARN_ON() when processing ANA AEN Hannes Reinecke
2018-07-26 15:10 ` Christoph Hellwig

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.