All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nvme: trace bio completion
@ 2019-07-24 13:47 Hannes Reinecke
  2019-07-24 18:21 ` Sagi Grimberg
  2019-08-01  1:23 ` Sagi Grimberg
  0 siblings, 2 replies; 3+ messages in thread
From: Hannes Reinecke @ 2019-07-24 13:47 UTC (permalink / raw)


When native multipathing is enabled we cannot enable blktrace for
the underlying paths, so any completion is never traced.

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

diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 8f3fbe5ca937..ba5a23475314 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -22,6 +22,8 @@
 #include <linux/pm_qos.h>
 #include <asm/unaligned.h>
 
+#include <trace/events/block.h>
+
 #define CREATE_TRACE_POINTS
 #include "trace.h"
 
@@ -261,6 +263,7 @@ static void nvme_retry_req(struct request *req)
 void nvme_complete_rq(struct request *req)
 {
 	blk_status_t status = nvme_error_status(req);
+	struct nvme_ns *ns = req->q->queuedata;
 
 	trace_nvme_complete_rq(req);
 
@@ -279,6 +282,9 @@ void nvme_complete_rq(struct request *req)
 			return;
 		}
 	}
+	if (req->bio && ns && ns->head->disk)
+		trace_block_bio_complete(ns->head->disk->queue,
+					 req->bio, status);
 	blk_mq_end_request(req, status);
 }
 EXPORT_SYMBOL_GPL(nvme_complete_rq);
-- 
2.16.4

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

* [PATCH] nvme: trace bio completion
  2019-07-24 13:47 [PATCH] nvme: trace bio completion Hannes Reinecke
@ 2019-07-24 18:21 ` Sagi Grimberg
  2019-08-01  1:23 ` Sagi Grimberg
  1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2019-07-24 18:21 UTC (permalink / raw)


Reviewed-by: Sagi Grimberg <sagi at grimberg.me>

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

* [PATCH] nvme: trace bio completion
  2019-07-24 13:47 [PATCH] nvme: trace bio completion Hannes Reinecke
  2019-07-24 18:21 ` Sagi Grimberg
@ 2019-08-01  1:23 ` Sagi Grimberg
  1 sibling, 0 replies; 3+ messages in thread
From: Sagi Grimberg @ 2019-08-01  1:23 UTC (permalink / raw)


applied to nvme-5.4

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

end of thread, other threads:[~2019-08-01  1:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-24 13:47 [PATCH] nvme: trace bio completion Hannes Reinecke
2019-07-24 18:21 ` Sagi Grimberg
2019-08-01  1:23 ` Sagi Grimberg

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.