blktrace: log dropped REQ_OP_ZONE_XXX events ver1
Subsystems (2)
PATCH v4 1/1 blktrace: log dropped REQ_OP_ZONE_XXX events ver1
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 createdblktests (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 createdblktests (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.
---
V3->V4:-
Replace REQ_OP_ZONE_XXX with "zone operations". (Damien, Jens)
--- kernel/trace/blktrace.c | 6 ++++++ 1 file changed, 6 insertions(+)
kernel/trace/blktrace.c +6 -0
@@ -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;
Signature · 1 line
2.39.5
Quoted 72 lines · Chaitanya Kulkarni
Add informational messages during blktrace setup when version 1 tools are used on kernels with
CONFIG_BLK_DEV_ZONEDenabled. 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 createdblktests (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 createdblktests (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_XXXin blktrace.Reviewed-by Damien Le Moal <[email protected]>Signed-off-by Chaitanya Kulkarni <[email protected]>---
V3->V4:-
Replace
REQ_OP_ZONE_XXXwith "zone operations". (Damien, Jens)--- kernel/trace/blktrace.c | 6 ++++++ 1 file changed, 6 insertions(+)kernel/trace/blktrace.c +0
-0
kernel/trace/blktrace.c static void blk_trace_setup_finalize(struct request_queue *q, · line 747
Quoted 7 lines
kernel/trace/blktrace.c +4
-0@@ -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" );
Since this message is split, please keep the same format for the second line. I.e.:
pr_info("%s: use blktrace tools version >= 2 to track zone operations\n",
name);
That will avoid incomprehensible interleaved output of if multiple traces are started together.
Quoted 5 lines
kernel/trace/blktrace.c +2
-0+ + } bt->version = version; bt->act_mask = buts->act_mask;
Signature · 2 lines
Damien Le Moal Western Digital Research