From: Andreas Gruenbacher <agruenba@redhat.com>
To: linux-btrace@vger.kernel.org
Subject: [PATCH 1/3] blkparse: Fix device in event tracking error messages
Date: Mon, 06 Apr 2020 14:09:13 +0000 [thread overview]
Message-ID: <20200406140915.109022-2-agruenba@redhat.com> (raw)
For some reason, dev in struct per_dev_info isn't set in the log_track_
functions, and so the error messages report (0,0) as the device. Fix by using
device in struct blk_io_trace instead.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
blkparse.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/blkparse.c b/blkparse.c
index 28bdf15..0054d4f 100644
--- a/blkparse.c
+++ b/blkparse.c
@@ -1006,7 +1006,7 @@ static void log_track_frontmerge(struct per_dev_info *pdi,
if (!iot) {
if (verbose)
fprintf(stderr, "merge not found for (%d,%d): %llu\n",
- MAJOR(pdi->dev), MINOR(pdi->dev),
+ MAJOR(t->device), MINOR(t->device),
(unsigned long long) t->sector + t_sec(t));
return;
}
@@ -1100,7 +1100,7 @@ static unsigned long long log_track_issue(struct per_dev_info *pdi,
if (!iot) {
if (verbose)
fprintf(stderr, "issue not found for (%d,%d): %llu\n",
- MAJOR(pdi->dev), MINOR(pdi->dev),
+ MAJOR(t->device), MINOR(t->device),
(unsigned long long) t->sector);
return -1;
}
@@ -1135,7 +1135,7 @@ static unsigned long long log_track_complete(struct per_dev_info *pdi,
if (!iot) {
if (verbose)
fprintf(stderr,"complete not found for (%d,%d): %llu\n",
- MAJOR(pdi->dev), MINOR(pdi->dev),
+ MAJOR(t->device), MINOR(t->device),
(unsigned long long) t->sector);
return -1;
}
--
2.25.1
reply other threads:[~2020-04-06 14:09 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200406140915.109022-2-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=linux-btrace@vger.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;
as well as URLs for NNTP newsgroup(s).