From: NeilBrown <neilb@suse.com>
To: Shaohua Li <shli@kernel.org>
Cc: linux-raid@vger.kernel.org
Subject: [md PATCH 2/4] md: add bio completion tracing for raid1/raid10
Date: Mon, 14 Nov 2016 16:30:21 +1100 [thread overview]
Message-ID: <147910142112.27168.16834874155342134173.stgit@noble> (raw)
In-Reply-To: <147910131504.27168.6566119701315109161.stgit@noble>
raid5 already has this, as does dm.
linear and raid0 do no see completions, only bio_chain_end() or bio_endio()
see those.
So just add it for raid1 and raid10.
Between
Commit: 3a366e614d08 ("block: add missing block_bio_complete() tracepoint")
and
Commit: 0a82a8d132b2 ("Revert "block: add missing block_bio_complete() tracepoint"")
in the 3.9-rc series, this was done centrally in bio_endio().
Until/unless that is resurected, do the tracing in the md/raid code.
Signed-off-by: NeilBrown <neilb@suse.com>
---
drivers/md/raid1.c | 1 +
drivers/md/raid10.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 3710a792a149..0674e5a0142e 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -257,6 +257,7 @@ static void call_bio_endio(struct r1bio *r1_bio)
bio->bi_error = -EIO;
if (done) {
+ trace_block_bio_complete(bdev_get_queue(bio->bi_bdev), bio, bio->bi_error);
bio_endio(bio);
/*
* Wake up any possible resync thread that waits for the device
diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c
index d144c3425824..c3036099ff9a 100644
--- a/drivers/md/raid10.c
+++ b/drivers/md/raid10.c
@@ -311,6 +311,7 @@ static void raid_end_bio_io(struct r10bio *r10_bio)
if (!test_bit(R10BIO_Uptodate, &r10_bio->state))
bio->bi_error = -EIO;
if (done) {
+ trace_block_bio_complete(bdev_get_queue(bio->bi_bdev), bio, bio->bi_error);
bio_endio(bio);
/*
* Wake up any possible resync thread that waits for the device
next prev parent reply other threads:[~2016-11-14 5:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-14 5:30 [md PATCH 0/4] Improve blktrace tracing of md NeilBrown
2016-11-14 5:30 ` [md PATCH 4/4] md/raid1, raid10: add blktrace records when IO is delayed NeilBrown
2016-11-14 5:30 ` [md PATCH 3/4] md/bitmap: add blktrace event for writes to the bitmap NeilBrown
2016-11-16 19:31 ` Shaohua Li
2016-11-14 5:30 ` NeilBrown [this message]
2016-11-16 14:32 ` [md PATCH 2/4] md: add bio completion tracing for raid1/raid10 Christoph Hellwig
2016-11-17 5:35 ` NeilBrown
2016-11-17 12:51 ` Christoph Hellwig
2016-11-14 5:30 ` [md PATCH 1/4] md: add block tracing for bio_remapping NeilBrown
2016-11-16 19:29 ` Shaohua Li
2016-11-17 5:33 ` NeilBrown
2016-11-17 18:04 ` Shaohua Li
2016-11-18 0:45 ` NeilBrown
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=147910142112.27168.16834874155342134173.stgit@noble \
--to=neilb@suse.com \
--cc=linux-raid@vger.kernel.org \
--cc=shli@kernel.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