From: Jeff Moyer <jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
To: "Dan J. Williams"
<dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org
Cc: linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [patch] nd_blk,nd_pmem,nd_btt: add endio blktrace events
Date: Wed, 09 Nov 2016 14:08:33 -0500 [thread overview]
Message-ID: <x49twbgo4i6.fsf@segfault.boston.devel.redhat.com> (raw)
Right now, any of the above three drivers will report Q events in
blktrace but no corresponding C events. Fix it.
Signed-off-by: Jeff Moyer <jmoyer-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c
index 9faaa96..90676f3 100644
--- a/drivers/nvdimm/blk.c
+++ b/drivers/nvdimm/blk.c
@@ -19,6 +19,7 @@
#include <linux/moduleparam.h>
#include <linux/nd.h>
#include <linux/sizes.h>
+#include <trace/events/block.h>
#include "nd.h"
static u32 nsblk_meta_size(struct nd_namespace_blk *nsblk)
@@ -213,6 +214,7 @@ static blk_qc_t nd_blk_make_request(struct request_queue *q, struct bio *bio)
nd_iostat_end(bio, start);
out:
+ trace_block_bio_complete(q, bio, bio->bi_error);
bio_endio(bio);
return BLK_QC_T_NONE;
}
diff --git a/drivers/nvdimm/btt.c b/drivers/nvdimm/btt.c
index 368795a..a11c00d 100644
--- a/drivers/nvdimm/btt.c
+++ b/drivers/nvdimm/btt.c
@@ -23,6 +23,7 @@
#include <linux/ndctl.h>
#include <linux/fs.h>
#include <linux/nd.h>
+#include <trace/events/block.h>
#include "btt.h"
#include "nd.h"
@@ -1195,6 +1196,7 @@ static blk_qc_t btt_make_request(struct request_queue *q, struct bio *bio)
nd_iostat_end(bio, start);
out:
+ trace_block_bio_complete(q, bio, bio->bi_error);
bio_endio(bio);
return BLK_QC_T_NONE;
}
diff --git a/drivers/nvdimm/pmem.c b/drivers/nvdimm/pmem.c
index 42b3a82..4ea3b9f 100644
--- a/drivers/nvdimm/pmem.c
+++ b/drivers/nvdimm/pmem.c
@@ -29,6 +29,7 @@
#include <linux/slab.h>
#include <linux/pmem.h>
#include <linux/nd.h>
+#include <trace/events/block.h>
#include "pmem.h"
#include "pfn.h"
#include "nd.h"
@@ -165,6 +166,7 @@ static blk_qc_t pmem_make_request(struct request_queue *q, struct bio *bio)
if (bio->bi_opf & REQ_FUA)
nvdimm_flush(nd_region);
+ trace_block_bio_complete(q, bio, bio->bi_error);
bio_endio(bio);
return BLK_QC_T_NONE;
}
next reply other threads:[~2016-11-09 19:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-09 19:08 Jeff Moyer [this message]
[not found] ` <x49twbgo4i6.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2016-11-09 19:17 ` [patch] nd_blk,nd_pmem,nd_btt: add endio blktrace events Christoph Hellwig
2016-11-09 19:31 ` Jeff Moyer
[not found] ` <x49mvh8o3fx.fsf-RRHT56Q3PSP4kTEheFKJxxDDeQx5vsVwAInAS/Ez/D0@public.gmane.org>
2016-11-09 19:34 ` Christoph Hellwig
2016-11-09 19:43 ` Jeff Moyer
2016-11-10 19:33 ` Christoph Hellwig
2016-11-11 14:55 ` Jeff Moyer
2016-11-16 4:56 ` Ross Zwisler
2016-11-16 14:06 ` Jeff Moyer
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=x49twbgo4i6.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer-h+wxahxf7alqt0dzr+alfa@public.gmane.org \
--cc=dan.j.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
--cc=linux-block-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-nvdimm-y27Ovi1pjclAfugRpC6u6w@public.gmane.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).