From: Chaitanya Kulkarni <kch@nvidia.com>
To: <axboe@kernel.dk>, <dlemoal@kernel.org>
Cc: <rostedt@goodmis.org>, <mhiramat@kernel.org>,
<linux-block@vger.kernel.org>,
<linux-trace-kernel@vger.kernel.org>,
Chaitanya Kulkarni <kch@nvidia.com>
Subject: [PATCH V4] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
Date: Wed, 11 Feb 2026 12:47:52 -0800 [thread overview]
Message-ID: <20260211204752.23061-1-kch@nvidia.com> (raw)
Add informational messages during blktrace setup when version 1 tools
are used on kernels with CONFIG_BLK_DEV_ZONED enabled. This alerts users
that REQ_OP_ZONE_* events will be dropped and suggests upgrading to
blktrace tools version 2 or later.
The warning is printed once during trace setup to inform users about
the limitation without spamming the logs during tracing operations.
Version 2 blktrace tools properly handle zone management operations
(zone reset, zone open, zone close, zone finish, zone append) that
were added for zoned block devices.
* With old blktrace tool and this patch :-
blktests (master) # ./check blktrace/
blktrace/001 (blktrace zone management command tracing) [passed]
runtime 3.706s ... 3.735s
blktrace/002 (blktrace ftrace corruption with sysfs trace) [passed]
runtime 0.479s ... 0.456s
blktests (master) # dmesg -c
[ 9455.610899] null_blk: disk nullb0 created
[ 9455.610916] null_blk: module loaded
[ 9455.634103] run blktests blktrace/001 at 2026-02-02 15:02:23
[ 9455.651710] null_blk: nullb1: using native zone append
[ 9455.662852] null_blk: disk nullb1 created
*[ 9455.714998] blktrace: nullb1: blktrace events for zone operations will be dropped*
*[ 9455.715065] blktrace: use blktrace tools version >= 2 to track zone operations*
[ 9459.480181] null_blk: disk nullb0 created
[ 9459.480199] null_blk: module loaded
[ 9459.514464] run blktests blktrace/002 at 2026-02-02 15:02:27
[ 9459.541772] null_blk: disk nullb1 created
blktests (master) #
* With new blktrace tools and this patch :-
blktests (master) # ./check blktrace/
blktrace/001 (blktrace zone management command tracing) [passed]
runtime 3.735s ... 3.734s
blktrace/002 (blktrace ftrace corruption with sysfs trace) [passed]
runtime 0.456s ... 0.496s
blktests (master) # dmesg -c
[ 9490.395572] null_blk: disk nullb0 created
[ 9490.395591] null_blk: module loaded
[ 9490.419467] run blktests blktrace/001 at 2026-02-02 15:02:58
[ 9490.436416] null_blk: nullb1: using native zone append
[ 9490.447806] null_blk: disk nullb1 created
[ 9494.262176] null_blk: disk nullb0 created
[ 9494.262195] null_blk: module loaded
[ 9494.296653] run blktests blktrace/002 at 2026-02-02 15:03:02
[ 9494.322261] null_blk: disk nullb1 created
blktests (master) #
This helps users understand why zone operation traces may be missing
when using older blktrace tool versions with modern kernels that
support REQ_OP_ZONE_XXX in blktrace.
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
Signed-off-by: Chaitanya Kulkarni <kch@nvidia.com>
---
V3->V4:-
Replace REQ_OP_ZONE_XXX with "zone operations". (Damien, Jens)
---
kernel/trace/blktrace.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index d031c8d80be4..04b41c698127 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -741,6 +741,12 @@ static void blk_trace_setup_finalize(struct request_queue *q,
* to underscores for this to work as expected
*/
strreplace(buts->name, '/', '_');
+ if (version == 1 && IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
+ pr_info("%s: blktrace events for zone operations will be dropped\n",
+ name);
+ pr_info("use blktrace tools version >= 2 to track zone operations\n");
+
+ }
bt->version = version;
bt->act_mask = buts->act_mask;
--
2.39.5
next reply other threads:[~2026-02-11 20:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-11 20:47 Chaitanya Kulkarni [this message]
2026-02-12 23:37 ` [PATCH V4] blktrace: log dropped REQ_OP_ZONE_XXX events ver1 Damien Le Moal
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=20260211204752.23061-1-kch@nvidia.com \
--to=kch@nvidia.com \
--cc=axboe@kernel.dk \
--cc=dlemoal@kernel.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rostedt@goodmis.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