]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
nvme: add bio remapping tracepoint
authorHannes Reinecke <hare@suse.de>
Thu, 7 Jun 2018 08:38:47 +0000 (10:38 +0200)
committerChristoph Hellwig <hch@lst.de>
Mon, 11 Jun 2018 14:17:46 +0000 (16:17 +0200)
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>
drivers/nvme/host/multipath.c

index d7b664ae5923e1217a493d68f1dac96c8a3cce4c..1ffd3e8b13a18dccf887beac8d1d053e64ce9c9b 100644 (file)
@@ -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");