Skip to contentSkip to conversation

nvme-core: fix nvme_setup_cmd trace call

PATCH New Chaitanya Kulkarni 4 participants 5 messages Jun 7, 2018 NVMe

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nvme-core: fix nvme_setup_cmd trace call

This patch fixes the trace_nvme_setup_admin_cmd() call, now we use NULL in place of ns->disk->disk_name when ns variable is NULL.

Signed-off-by Chaitanya Kulkarni <chaitanya.kulkarni at wdc.com>
---
 drivers/nvme/host/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvme/host/core.c +1 -1
index 3250f8d72456..6ac682b67e15 100644
@@ -655,7 +655,7 @@ blk_status_t nvme_setup_cmd(struct nvme_ns *ns, struct request *req,
 	if (ns)
 		trace_nvme_setup_nvm_cmd(ns->disk->disk_name, req->q->id, cmd);
 	else
-		trace_nvme_setup_admin_cmd(ns->disk->disk_name, cmd);
+		trace_nvme_setup_admin_cmd(NULL, cmd);
 	return ret;
 }
 EXPORT_SYMBOL_GPL(nvme_setup_cmd);
Signature · 1 line
2.17.0
#1 lore raw

PATCH 1/1 nvme-core: fix nvme_setup_cmd trace call

Quoted 2 lines · Chaitanya Kulkarni

This patch fixes the trace_nvme_setup_admin_cmd() call, now we use NULL in place of ns->disk->disk_name when ns variable is NULL.

Oops, good catch,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>

Signature · 6 lines
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
#2 lore raw

PATCH 1/1 nvme-core: fix nvme_setup_cmd trace call

Quoted 6 lines · Johannes Thumshirn
Quoted 2 lines · Chaitanya Kulkarni

This patch fixes the trace_nvme_setup_admin_cmd() call, now we use NULL in place of ns->disk->disk_name when ns variable is NULL.

Oops, good catch,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>

There is no point in ever in the NULL argument to the admin cmd tracer. I've dropped the original patch from nvme-4.18, let's redo it properly for 4.19.

#3 lore raw

PATCH 1/1 nvme-core: fix nvme_setup_cmd trace call

Quoted 11 lines · Christoph Hellwig
Quoted 6 lines · Johannes Thumshirn
Quoted 2 lines · Chaitanya Kulkarni

This patch fixes the trace_nvme_setup_admin_cmd() call, now we use NULL in place of ns->disk->disk_name when ns variable is NULL.

Oops, good catch,
Reviewed-by: Johannes Thumshirn <jthumshirn at suse.de>

There is no point in ever in the NULL argument to the admin cmd tracer. I've dropped the original patch from nvme-4.18, let's redo it properly for 4.19.

Thinking more of it, it's probably best to supply the print the controller name only. The nvm command tracer would print the NSID anyways.

Printing the controller name can be done for admin and NVM commands and should be enough if we really want to distinguish between commands for different devices.

Signature · 6 lines
Johannes Thumshirn                                          Storage
jthumshirn at suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: Felix Imend?rffer, Jane Smithard, Graham Norton
HRB 21284 (AG N?rnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850