* [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
@ 2025-10-28 17:32 Chaitanya Kulkarni
2025-10-29 6:47 ` Johannes Thumshirn
2025-12-19 23:55 ` Damien Le Moal
0 siblings, 2 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2025-10-28 17:32 UTC (permalink / raw)
To: johannes.thumshirn
Cc: axboe, dlemoal, rostedt, mhiramat, mathieu.desnoyers,
martin.petersen, 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.
Example output:
blktests (master) # ./check blktrace
blktrace/001 (blktrace zone management command tracing) [passed]
runtime 0.110s ... 3.917s
blktrace/002 (blktrace ftrace corruption with sysfs trace) [passed]
runtime 0.333s ... 0.608s
blktests (master) # dmesg -c
[ 57.610592] blktrace: nullb0: blktrace events for REQ_OP_ZONE_XXX will be dropped
[ 57.610603] blktrace: use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX
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 <ckulkarnilinux@gmail.com>
---
v1->v2 :-
Remove the extra () around IS_ENABLED(CONFIG_BLK_DEV_ZONED). (Jens)
Add a space after device name in first pr_info(). (Jens)
---
kernel/trace/blktrace.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
index e4f26ddb7ee2..4a37d9aa0481 100644
--- a/kernel/trace/blktrace.c
+++ b/kernel/trace/blktrace.c
@@ -739,6 +739,12 @@ static void blk_trace_setup_finalize(struct request_queue *q,
*/
strreplace(buts->name, '/', '_');
+ if (version == 1 && IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
+ pr_info("%s: blktrace events for REQ_OP_ZONE_XXX will be dropped\n",
+ name);
+ pr_info("use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX\n");
+ }
+
bt->version = version;
bt->act_mask = buts->act_mask;
if (!bt->act_mask)
--
2.40.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
2025-10-28 17:32 [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1 Chaitanya Kulkarni
@ 2025-10-29 6:47 ` Johannes Thumshirn
2025-12-19 23:50 ` Chaitanya Kulkarni
2025-12-19 23:55 ` Damien Le Moal
1 sibling, 1 reply; 6+ messages in thread
From: Johannes Thumshirn @ 2025-10-29 6:47 UTC (permalink / raw)
To: Chaitanya Kulkarni
Cc: axboe@kernel.dk, dlemoal@kernel.org, rostedt@goodmis.org,
mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
martin.petersen@oracle.com, linux-block@vger.kernel.org,
linux-trace-kernel@vger.kernel.org
On 10/28/25 6:32 PM, Chaitanya Kulkarni wrote:
> + if (version == 1 && IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
> + pr_info("%s: blktrace events for REQ_OP_ZONE_XXX will be dropped\n",
> + name);
> + pr_info("use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX\n");
Jens hasn't merged the user-space part yet and I'm not sure he'll assign
a dedicated version number for it. So I'd say hold this until he has.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
2025-10-29 6:47 ` Johannes Thumshirn
@ 2025-12-19 23:50 ` Chaitanya Kulkarni
0 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2025-12-19 23:50 UTC (permalink / raw)
To: Johannes Thumshirn, Chaitanya Kulkarni
Cc: axboe@kernel.dk, dlemoal@kernel.org, rostedt@goodmis.org,
mhiramat@kernel.org, mathieu.desnoyers@efficios.com,
martin.petersen@oracle.com, linux-block@vger.kernel.org,
linux-trace-kernel@vger.kernel.org, Chaitanya Kulkarni
On 10/28/25 23:47, Johannes Thumshirn wrote:
> On 10/28/25 6:32 PM, Chaitanya Kulkarni wrote:
>> + if (version == 1 && IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
>> + pr_info("%s: blktrace events for REQ_OP_ZONE_XXX will be dropped\n",
>> + name);
>> + pr_info("use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX\n");
> Jens hasn't merged the user-space part yet and I'm not sure he'll assign
> a dedicated version number for it. So I'd say hold this until he has.
>
Now Jen's has merged the userspace part, may I please get a reviewed-by if this
looks good?
-ck
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
2025-10-28 17:32 [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1 Chaitanya Kulkarni
2025-10-29 6:47 ` Johannes Thumshirn
@ 2025-12-19 23:55 ` Damien Le Moal
2025-12-22 23:28 ` Jens Axboe
1 sibling, 1 reply; 6+ messages in thread
From: Damien Le Moal @ 2025-12-19 23:55 UTC (permalink / raw)
To: Chaitanya Kulkarni, johannes.thumshirn
Cc: axboe, rostedt, mhiramat, mathieu.desnoyers, martin.petersen,
linux-block, linux-trace-kernel
On 10/29/25 02:32, 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.
>
> Example output:
>
> blktests (master) # ./check blktrace
> blktrace/001 (blktrace zone management command tracing) [passed]
> runtime 0.110s ... 3.917s
> blktrace/002 (blktrace ftrace corruption with sysfs trace) [passed]
> runtime 0.333s ... 0.608s
> blktests (master) # dmesg -c
> [ 57.610592] blktrace: nullb0: blktrace events for REQ_OP_ZONE_XXX will be dropped
> [ 57.610603] blktrace: use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX
>
> 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 <ckulkarnilinux@gmail.com>
> ---
> v1->v2 :-
>
> Remove the extra () around IS_ENABLED(CONFIG_BLK_DEV_ZONED). (Jens)
> Add a space after device name in first pr_info(). (Jens)
>
> ---
> kernel/trace/blktrace.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
> index e4f26ddb7ee2..4a37d9aa0481 100644
> --- a/kernel/trace/blktrace.c
> +++ b/kernel/trace/blktrace.c
> @@ -739,6 +739,12 @@ static void blk_trace_setup_finalize(struct request_queue *q,
> */
> strreplace(buts->name, '/', '_');
>
> + if (version == 1 && IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
> + pr_info("%s: blktrace events for REQ_OP_ZONE_XXX will be dropped\n",
> + name);
> + pr_info("use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX\n");
Please change REQ_OP_ZONE_XXX to "zone operations" in these messages. That is a
little more general, so better I think since we also trace zone write
plug/unplug events, which are not REQ_OP_ZONE_XXX.
With that done,
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
> + }
> +
> bt->version = version;
> bt->act_mask = buts->act_mask;
> if (!bt->act_mask)
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
2025-12-19 23:55 ` Damien Le Moal
@ 2025-12-22 23:28 ` Jens Axboe
2025-12-23 2:13 ` Chaitanya Kulkarni
0 siblings, 1 reply; 6+ messages in thread
From: Jens Axboe @ 2025-12-22 23:28 UTC (permalink / raw)
To: Damien Le Moal, Chaitanya Kulkarni, johannes.thumshirn
Cc: rostedt, mhiramat, mathieu.desnoyers, martin.petersen,
linux-block, linux-trace-kernel
On 12/19/25 4:55 PM, Damien Le Moal wrote:
> On 10/29/25 02:32, 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.
>>
>> Example output:
>>
>> blktests (master) # ./check blktrace
>> blktrace/001 (blktrace zone management command tracing) [passed]
>> runtime 0.110s ... 3.917s
>> blktrace/002 (blktrace ftrace corruption with sysfs trace) [passed]
>> runtime 0.333s ... 0.608s
>> blktests (master) # dmesg -c
>> [ 57.610592] blktrace: nullb0: blktrace events for REQ_OP_ZONE_XXX will be dropped
>> [ 57.610603] blktrace: use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX
>>
>> 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 <ckulkarnilinux@gmail.com>
>> ---
>> v1->v2 :-
>>
>> Remove the extra () around IS_ENABLED(CONFIG_BLK_DEV_ZONED). (Jens)
>> Add a space after device name in first pr_info(). (Jens)
>>
>> ---
>> kernel/trace/blktrace.c | 6 ++++++
>> 1 file changed, 6 insertions(+)
>>
>> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
>> index e4f26ddb7ee2..4a37d9aa0481 100644
>> --- a/kernel/trace/blktrace.c
>> +++ b/kernel/trace/blktrace.c
>> @@ -739,6 +739,12 @@ static void blk_trace_setup_finalize(struct request_queue *q,
>> */
>> strreplace(buts->name, '/', '_');
>>
>> + if (version == 1 && IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
>> + pr_info("%s: blktrace events for REQ_OP_ZONE_XXX will be dropped\n",
>> + name);
>> + pr_info("use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX\n");
>
> Please change REQ_OP_ZONE_XXX to "zone operations" in these messages. That is a
> little more general, so better I think since we also trace zone write
> plug/unplug events, which are not REQ_OP_ZONE_XXX.
Agree, REQ_OP_ZONE_XXX means nothing in userspace.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1
2025-12-22 23:28 ` Jens Axboe
@ 2025-12-23 2:13 ` Chaitanya Kulkarni
0 siblings, 0 replies; 6+ messages in thread
From: Chaitanya Kulkarni @ 2025-12-23 2:13 UTC (permalink / raw)
To: Jens Axboe, Damien Le Moal
Cc: rostedt@goodmis.org, mhiramat@kernel.org,
mathieu.desnoyers@efficios.com, johannes.thumshirn@wdc.com,
Chaitanya Kulkarni, martin.petersen@oracle.com,
linux-block@vger.kernel.org, linux-trace-kernel@vger.kernel.org
On 12/22/25 3:28 PM, Jens Axboe wrote:
>>> */
>>> strreplace(buts->name, '/', '_');
>>>
>>> + if (version == 1 && IS_ENABLED(CONFIG_BLK_DEV_ZONED)) {
>>> + pr_info("%s: blktrace events for REQ_OP_ZONE_XXX will be dropped\n",
>>> + name);
>>> + pr_info("use blktrace tools version >= 2 to track REQ_OP_ZONE_XXX\n");
>> Please change REQ_OP_ZONE_XXX to "zone operations" in these messages. That is a
>> little more general, so better I think since we also trace zone write
>> plug/unplug events, which are not REQ_OP_ZONE_XXX.
> Agree, REQ_OP_ZONE_XXX means nothing in userspace.
>
> -- Jens Axboe
Thanks Damien and Jens for comment.
Will send out V3 soon.
-ck
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-12-23 2:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-28 17:32 [PATCH V2] blktrace: log dropped REQ_OP_ZONE_XXX events ver1 Chaitanya Kulkarni
2025-10-29 6:47 ` Johannes Thumshirn
2025-12-19 23:50 ` Chaitanya Kulkarni
2025-12-19 23:55 ` Damien Le Moal
2025-12-22 23:28 ` Jens Axboe
2025-12-23 2:13 ` Chaitanya Kulkarni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox