From: hare@suse.de (Hannes Reinecke)
Subject: [PATCH] nvme: trace bio completion
Date: Wed, 24 Jul 2019 15:47:55 +0200 [thread overview]
Message-ID: <20190724134755.96315-1-hare@suse.de> (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
next reply other threads:[~2019-07-24 13:47 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-24 13:47 Hannes Reinecke [this message]
2019-07-24 18:21 ` [PATCH] nvme: trace bio completion Sagi Grimberg
2019-08-01 1:23 ` Sagi Grimberg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190724134755.96315-1-hare@suse.de \
--to=hare@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.