summaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/multipath.c
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2018-06-07 10:38:47 +0200
committerChristoph Hellwig <hch@lst.de>2018-06-11 16:17:46 +0200
commit2796b569591c6f0681303f148a55e50c2cc8304a (patch)
treed8e60ff29027a3b5825d46aefaaccb20f353ebda /drivers/nvme/host/multipath.c
parentnvme: fix NULL pointer dereference in nvme_init_subsystem (diff)
downloadlinux-2796b569591c6f0681303f148a55e50c2cc8304a.tar.xz
linux-2796b569591c6f0681303f148a55e50c2cc8304a.zip
nvme: add bio remapping tracepoint
Adding a tracepoint to trace bio remapping for native nvme multipath. Signed-off-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to '')
-rw-r--r--drivers/nvme/host/multipath.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
index d7b664ae5923..1ffd3e8b13a1 100644
--- a/drivers/nvme/host/multipath.c
+++ b/drivers/nvme/host/multipath.c
@@ -12,6 +12,7 @@
*/
#include <linux/moduleparam.h>
+#include <trace/events/block.h>
#include "nvme.h"
static bool multipath = true;
@@ -111,6 +112,9 @@ static blk_qc_t nvme_ns_head_make_request(struct request_queue *q,
if (likely(ns)) {
bio->bi_disk = ns->disk;
bio->bi_opf |= REQ_NVME_MPATH;
+ trace_block_bio_remap(bio->bi_disk->queue, bio,
+ disk_devt(ns->head->disk),
+ bio->bi_iter.bi_sector);
ret = direct_make_request(bio);
} else if (!list_empty_careful(&head->list)) {
dev_warn_ratelimited(dev, "no path available - requeuing I/O\n");