blktests failures with v7.0-rc1 kernel
Chaitanya Kulkarni
chaitanyak at nvidia.com
Tue Mar 3 11:19:30 PST 2026
On 3/2/26 02:50, Leon Romanovsky wrote:
>> and blk_add_trace_rq() paths as well.
>>
>> Fix by wrapping the tracing_record_cmdline() call with
>> preempt_disable()/preempt_enable(). This is a best-effort "record
>> the comm string for this PID" operation and briefly disabling
>> preemption around it is both safe and correct.
>>
>> With this patch now blktests for blktrace pass :-
>>
>> blktests (master) # ./check blktrace
>> blktrace/001 (blktrace zone management command tracing) [passed]
>> runtime 3.652s ... 3.649s
>> blktrace/002 (blktrace ftrace corruption with sysfs trace) [passed]
>> runtime 0.437s ... 0.389s
>> blktests (master) #
>>
>>
>> Signed-off-by: Chaitanya Kulkarni<kch at nvidia.com>
>> ---
>> kernel/trace/blktrace.c | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c
>> index 3b7c102a6eb3..488552036583 100644
>> --- a/kernel/trace/blktrace.c
>> +++ b/kernel/trace/blktrace.c
>> @@ -383,7 +383,9 @@ static void __blk_add_trace(struct blk_trace *bt,
>> sector_t sector, int bytes,
>> cpu = raw_smp_processor_id();
>>
>> if (blk_tracer) {
>> + preempt_disable_notrace();
>> tracing_record_cmdline(current);
>> + preempt_enable_notrace();
> These lines likely belong in tracing_record_cmdline().
>
> Thanks
>
>> buffer = blk_tr->array_buffer.buffer;
>> trace_ctx = tracing_gen_ctx_flags(0);
>> --
>> 2.39.5
>>
Thanks for taking a look at it.
We moved the call tracing_record_cmdline() so we don't have to add
above calls and merged for now, see :-
https://marc.info/?l=linux-block&m=177241367620735&w=2
I'll be happy to send above suggested patch if needed.
-ck
-ck
More information about the Linux-nvme
mailing list