* [PATCH] nvme-core: trace discovery log change AEN
@ 2019-05-06 19:33 Chaitanya Kulkarni
2019-05-08 18:00 ` Chaitanya Kulkarni
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2019-05-06 19:33 UTC (permalink / raw)
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(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index cd16d98d1f1a..32e12ee42785 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -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);
diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h
index 97d3c77365b8..f2fda5fb01fb 100644
--- a/drivers/nvme/host/trace.h
+++ b/drivers/nvme/host/trace.h
@@ -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),
--
2.17.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] nvme-core: trace discovery log change AEN
2019-05-06 19:33 [PATCH] nvme-core: trace discovery log change AEN Chaitanya Kulkarni
@ 2019-05-08 18:00 ` Chaitanya Kulkarni
2019-05-09 8:27 ` Johannes Thumshirn
2019-05-13 13:24 ` Christoph Hellwig
2 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2019-05-08 18:00 UTC (permalink / raw)
Ping, it helps in debugging discovery related events.
Can someone please review this ?
On 05/06/2019 12:33 PM, Chaitanya Kulkarni wrote:
> 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(+)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index cd16d98d1f1a..32e12ee42785 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -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);
> diff --git a/drivers/nvme/host/trace.h b/drivers/nvme/host/trace.h
> index 97d3c77365b8..f2fda5fb01fb 100644
> --- a/drivers/nvme/host/trace.h
> +++ b/drivers/nvme/host/trace.h
> @@ -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),
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme-core: trace discovery log change AEN
2019-05-06 19:33 [PATCH] nvme-core: trace discovery log change AEN Chaitanya Kulkarni
2019-05-08 18:00 ` Chaitanya Kulkarni
@ 2019-05-09 8:27 ` Johannes Thumshirn
2019-05-13 13:24 ` Christoph Hellwig
2 siblings, 0 replies; 6+ messages in thread
From: Johannes Thumshirn @ 2019-05-09 8:27 UTC (permalink / raw)
Looks good,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>
--
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
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme-core: trace discovery log change AEN
2019-05-06 19:33 [PATCH] nvme-core: trace discovery log change AEN Chaitanya Kulkarni
2019-05-08 18:00 ` Chaitanya Kulkarni
2019-05-09 8:27 ` Johannes Thumshirn
@ 2019-05-13 13:24 ` Christoph Hellwig
2019-05-13 16:32 ` Chaitanya Kulkarni
2 siblings, 1 reply; 6+ messages in thread
From: Christoph Hellwig @ 2019-05-13 13:24 UTC (permalink / raw)
> 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);
What about just moving the trace_nvme_async_event call before the
switch statement?
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme-core: trace discovery log change AEN
2019-05-13 13:24 ` Christoph Hellwig
@ 2019-05-13 16:32 ` Chaitanya Kulkarni
2019-05-13 16:35 ` Christoph Hellwig
0 siblings, 1 reply; 6+ messages in thread
From: Chaitanya Kulkarni @ 2019-05-13 16:32 UTC (permalink / raw)
On 05/13/2019 06:24 AM, Christoph Hellwig wrote:
>> 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);
>
> What about just moving the trace_nvme_async_event call 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.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] nvme-core: trace discovery log change AEN
2019-05-13 16:32 ` Chaitanya Kulkarni
@ 2019-05-13 16:35 ` Christoph Hellwig
0 siblings, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2019-05-13 16:35 UTC (permalink / raw)
On Mon, May 13, 2019@04:32:01PM +0000, Chaitanya Kulkarni wrote:
> > What about just moving the trace_nvme_async_event call 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.
Doing both sounds fine and even desirable, so that we see the
invalid case in the traces as well as in the dmesg log.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-05-13 16:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-06 19:33 [PATCH] nvme-core: trace discovery log change AEN Chaitanya Kulkarni
2019-05-08 18:00 ` Chaitanya Kulkarni
2019-05-09 8:27 ` Johannes Thumshirn
2019-05-13 13:24 ` Christoph Hellwig
2019-05-13 16:32 ` Chaitanya Kulkarni
2019-05-13 16:35 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox