Skip to contentSkip to conversation

nvme: drop WARN_ON() when processing ANA AEN

PATCH New Hannes Reinecke 2 participants 2 messages Jul 26, 2018 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme: drop WARN_ON() when processing ANA AEN

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(-)
drivers/nvme/host/core.c +4 -3
index 39bdfe806d1b..3b96ace1f86d 100644
@@ -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);
Signature · 1 line
2.12.3
#1 lore raw

PATCH 1/1 nvme: drop WARN_ON() when processing ANA AEN

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