nvme-core: trace discovery log change AEN
PATCH 1/1 nvme-core: trace discovery log change AEN
This patch allows the user to trace discovery log change notification.
--- drivers/nvme/host/core.c | 3 +++ drivers/nvme/host/trace.h | 1 + 2 files changed, 4 insertions(+)
drivers/nvme/host/core.c +3 -0
@@ -3615,6 +3615,9 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)trace_nvme_async_event (ctrl, aer_notice_type);queue_work (nvme_wq, &ctrl->fw_act_work);break ; +case NVME_AER_NOTICE_DISC_CHANGED : +trace_nvme_async_event (ctrl, aer_notice_type); +break ;#ifdef CONFIG_NVME_MULTIPATH case NVME_AER_NOTICE_ANA :trace_nvme_async_event (ctrl, aer_notice_type);
drivers/nvme/host/trace.h +1 -0
@@ -165,6 +165,7 @@ TRACE_EVENT(nvme_async_event, __entry->ctrl_id, __entry->result, __print_symbolic(__entry->result, aer_name(NVME_AER_NOTICE_NS_CHANGED), + aer_name(NVME_AER_NOTICE_DISC_CHANGED). aer_name(NVME_AER_NOTICE_ANA), aer_name(NVME_AER_NOTICE_FW_ACT_STARTING), aer_name(NVME_AER_ERROR),
Signature · 1 line
2.17.0
PATCH 1/1 nvme-core: trace discovery log change AEN
Ping, it helps in debugging discovery related events.
Can someone please review this ?
Quoted 35 lines · Chaitanya Kulkarni
This patch allows the user to trace discovery log change notification.
Signed-off-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>--- drivers/nvme/host/core.c | 3 +++ drivers/nvme/host/trace.h | 1 + 2 files changed, 4 insertions(+)drivers/nvme/host/core.c +3
-0@@ -3615,6 +3615,9 @@ static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result)trace_nvme_async_event (ctrl, aer_notice_type);queue_work (nvme_wq, &ctrl->fw_act_work);break ; +case NVME_AER_NOTICE_DISC_CHANGED : +trace_nvme_async_event (ctrl, aer_notice_type); +break ;#ifdef CONFIG_NVME_MULTIPATH case NVME_AER_NOTICE_ANA :trace_nvme_async_event (ctrl, aer_notice_type);drivers/nvme/host/trace.h +1
-0@@ -165,6 +165,7 @@ TRACE_EVENT(nvme_async_event, __entry->ctrl_id, __entry->result, __print_symbolic(__entry->result, aer_name(NVME_AER_NOTICE_NS_CHANGED), + aer_name(NVME_AER_NOTICE_DISC_CHANGED). aer_name(NVME_AER_NOTICE_ANA), aer_name(NVME_AER_NOTICE_FW_ACT_STARTING), aer_name(NVME_AER_ERROR),
PATCH 1/1 nvme-core: trace discovery log change AEN
In reply to Chaitanya KulkarniLooks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
Signature · 6 lines
Johannes Thumshirn SUSE Labs Filesystems jthumshirn at suse.de +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg GF: Felix Imend?rffer, Mary Higgins, Sri Rasiah HRB 21284 (AG N?rnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
PATCH 1/1 nvme-core: trace discovery log change AEN
In reply to Chaitanya Kulkarnidrivers/nvme/host/core.c static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result) · line 3623
Quoted 9 lines
drivers/nvme/host/core.c +3
-0trace_nvme_async_event (ctrl, aer_notice_type);queue_work (nvme_wq, &ctrl->fw_act_work);break ; +case NVME_AER_NOTICE_DISC_CHANGED : +trace_nvme_async_event (ctrl, aer_notice_type); +break ;#ifdef CONFIG_NVME_MULTIPATH case NVME_AER_NOTICE_ANA :trace_nvme_async_event (ctrl, aer_notice_type);
What about just moving the trace_nvme_async_event call before the switch statement?
PATCH 1/1 nvme-core: trace discovery log change AEN
Quoted 4 lines · Christoph Hellwig
Quoted 4 lines
trace_nvme_async_event(ctrl, aer_notice_type); queue_work(nvme_wq, &ctrl->fw_act_work); break;drivers/nvme/host/core.c +1
-0+case NVME_AER_NOTICE_DISC_CHANGED :
Quoted 9 lines
drivers/nvme/host/core.c static void nvme_handle_aen_notice(struct nvme_ctrl *ctrl, u32 result) · line 3623
Quoted 5 lines
drivers/nvme/host/core.c +2
-0+trace_nvme_async_event (ctrl, aer_notice_type); +break ;#ifdef CONFIG_NVME_MULTIPATH case NVME_AER_NOTICE_ANA :trace_nvme_async_event (ctrl, aer_notice_type);What about just moving the
trace_nvme_async_eventcall before the switch statement?
That is something I avoided since for default case we don't want to trace but dev_warn.
But seems like we are okay with trace and dev_warn I'll send a V2.
PATCH 1/1 nvme-core: trace discovery log change AEN
Quoted 8 lines · Chaitanya Kulkarni
Quoted 3 lines
What about just moving the
trace_nvme_async_eventcall before the switch statement?That is something I avoided since for default case we don't want to trace but
dev_warn.But seems like we are okay with trace and
dev_warnI'll send a V2.
Doing both sounds fine and even desirable, so that we see the invalid case in the traces as well as in the dmesg log.