Thread (2 messages) 2 messages, 2 authors, 2025-10-28

Re: [PATCH] blktrace: log dropped REQ_OP_ZONE_XXX events ver1

From: Jens Axboe <axboe@kernel.dk>
Date: 2025-10-28 13:54:40
Also in: linux-block

On 10/27/25 10:32 PM, Chaitanya Kulkarni wrote:
quoted hunk ↗ jump to hunk
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.

Example output:
blktests (master) # ./check blktrace
blktrace/001 (blktrace zone management command tracing)      [passed]
    runtime  3.882s  ...  3.866s
blktests (master) # dmesg -c
[   95.874361] blktrace: nullb0:blktrace events for REQ_OP_ZONE_XXX will be dropped
[   95.874372] blktrace: use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX
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.

Signed-off-by: Chaitanya Kulkarni <redacted>
---
 kernel/trace/blktrace.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index 776ae4190f36..200d0deb6c90 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -690,6 +690,12 @@ static void blk_trace_setup_finalize(struct request_queue *q,
 	 */
 	strreplace(buts->name, '/', '_');
 
+	if (version == 1 && (IS_ENABLED(CONFIG_BLK_DEV_ZONED))) {
Redundant parens around IS_ENABLED() here.
+		pr_info("%s:blktrace events for REQ_OP_ZONE_XXX will be dropped\n",
+				name);
%s: blktrace events [...]? Seems weird not to have a space there.

-- 
Jens Axboe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help