public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
@ 2026-02-11 20:47 Chaitanya Kulkarni
  2026-02-12 23:37 ` Damien Le Moal
  0 siblings, 1 reply; 2+ messages in thread
From: Chaitanya Kulkarni @ 2026-02-11 20:47 UTC (permalink / raw)
  To: axboe, dlemoal
  Cc: rostedt, mhiramat, linux-block, linux-trace-kernel,
	Chaitanya Kulkarni

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V4] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
  2026-02-11 20:47 [PATCH V4] blktrace: log dropped REQ_OP_ZONE_XXX events ver1 Chaitanya Kulkarni
@ 2026-02-12 23:37 ` Damien Le Moal
  0 siblings, 0 replies; 2+ messages in thread
From: Damien Le Moal @ 2026-02-12 23:37 UTC (permalink / raw)
  To: Chaitanya Kulkarni, axboe
  Cc: rostedt, mhiramat, linux-block, linux-trace-kernel

On 2/12/26 05:47, Chaitanya Kulkarni wrote:
> 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");

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.

> +
> +	}
>  
>  	bt->version = version;
>  	bt->act_mask = buts->act_mask;


-- 
Damien Le Moal
Western Digital Research

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-02-12 23:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-11 20:47 [PATCH V4] blktrace: log dropped REQ_OP_ZONE_XXX events ver1 Chaitanya Kulkarni
2026-02-12 23:37 ` Damien Le Moal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox