From nobody Tue Apr 7 01:53:20 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 89337C4332F for ; Mon, 10 Oct 2022 08:10:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231278AbiJJIKD (ORCPT ); Mon, 10 Oct 2022 04:10:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231153AbiJJIJ6 (ORCPT ); Mon, 10 Oct 2022 04:09:58 -0400 Received: from out199-14.us.a.mail.aliyun.com (out199-14.us.a.mail.aliyun.com [47.90.199.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8DA05B1C0; Mon, 10 Oct 2022 01:09:56 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R391e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046050;MF=chentao.kernel@linux.alibaba.com;NM=1;PH=DS;RN=8;SR=0;TI=SMTPD_---0VRo5NJM_1665389343; Received: from localhost(mailfrom:chentao.kernel@linux.alibaba.com fp:SMTPD_---0VRo5NJM_1665389343) by smtp.aliyun-inc.com; Mon, 10 Oct 2022 16:09:52 +0800 From: Bixuan Cui To: rostedt@goodmis.org, mhiramat@kernel.org, bvanassche@acm.org, axboe@kernel.dk, tytso@mit.edu, linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org Cc: cuibixuan@linux.alibaba.com Subject: [PATCH -next] jbd2: use the correct print format Date: Mon, 10 Oct 2022 16:09:03 +0800 Message-Id: <1665389343-35572-1-git-send-email-cuibixuan@linux.alibaba.com> X-Mailer: git-send-email 1.8.3.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The print format error was found when using ftrace event: <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 trans= action -1866216965 sync 0 head -1866217368 <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 tra= nsaction -1866216964 sync 0 Print transaction and head with the unsigned format "%u" instead. Fixes: 879c5e6b7cb4 ('jbd2: convert instrumentation from markers to tracepo= ints') Signed-off-by: Bixuan Cui --- include/trace/events/jbd2.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 99f783c..ce9accb 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h @@ -40,7 +40,7 @@ TP_STRUCT__entry( __field( dev_t, dev ) __field( char, sync_commit ) - __field( int, transaction ) + __field( tid_t, transaction ) ), =20 TP_fast_assign( @@ -49,7 +49,7 @@ __entry->transaction =3D commit_transaction->t_tid; ), =20 - TP_printk("dev %d,%d transaction %d sync %d", + TP_printk("dev %d,%d transaction %u sync %d", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->transaction, __entry->sync_commit) ); @@ -97,8 +97,8 @@ TP_STRUCT__entry( __field( dev_t, dev ) __field( char, sync_commit ) - __field( int, transaction ) - __field( int, head ) + __field( tid_t, transaction ) + __field( tid_t, head ) ), =20 TP_fast_assign( @@ -108,7 +108,7 @@ __entry->head =3D journal->j_tail_sequence; ), =20 - TP_printk("dev %d,%d transaction %d sync %d head %d", + TP_printk("dev %d,%d transaction %u sync %d head %u", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->transaction, __entry->sync_commit, __entry->head) ); --=20 1.8.3.1