mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] jbd2: use the correct print format
@ 2022-03-18 15:56 Bixuan Cui
  2022-03-21  9:25 ` Jan Kara
  0 siblings, 1 reply; 5+ messages in thread
From: Bixuan Cui @ 2022-03-18 15:56 UTC (permalink / raw)
  To: linux-kernel; +Cc: cuibixuan, rostedt, mingo, yi.zhang, jack

The print format error was found when using ftrace event:
    <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368
    <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0

Print transaction and head with the unsigned format "%u" instead.

Fixes: 879c5e6b7cb4 ('jbd2: convert instrumentation from markers to tracepoints')
Signed-off-by: Bixuan Cui <cuibixuan@linux.alibaba.com>
---
 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 a4dfe005983d..5be1aa1691fb 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
 	TP_STRUCT__entry(
 		__field(	dev_t,	dev			)
 		__field(	char,	sync_commit		  )
-		__field(	int,	transaction		  )
+		__field(	tid_t,	transaction		  )
 	),
 
 	TP_fast_assign(
@@ -49,7 +49,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
 		__entry->transaction	= commit_transaction->t_tid;
 	),
 
-	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 @@ TRACE_EVENT(jbd2_end_commit,
 	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		  	  )
 	),
 
 	TP_fast_assign(
@@ -108,7 +108,7 @@ TRACE_EVENT(jbd2_end_commit,
 		__entry->head		= journal->j_tail_sequence;
 	),
 
-	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)
 );
-- 
2.19.1.6.gb485710b


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

* Re: [PATCH -next] jbd2: use the correct print format
  2022-03-18 15:56 [PATCH -next] jbd2: use the correct print format Bixuan Cui
@ 2022-03-21  9:25 ` Jan Kara
  2022-04-22  2:42   ` 回复:[PATCH " cuibixuan
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kara @ 2022-03-21  9:25 UTC (permalink / raw)
  To: Bixuan Cui; +Cc: linux-kernel, rostedt, mingo, yi.zhang, jack

On Fri 18-03-22 23:56:40, Bixuan Cui wrote:
> The print format error was found when using ftrace event:
>     <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368
>     <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0
> 
> Print transaction and head with the unsigned format "%u" instead.
> 
> Fixes: 879c5e6b7cb4 ('jbd2: convert instrumentation from markers to tracepoints')
> Signed-off-by: Bixuan Cui <cuibixuan@linux.alibaba.com>

Makes sense. Thanks for the fix. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  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 a4dfe005983d..5be1aa1691fb 100644
> --- a/include/trace/events/jbd2.h
> +++ b/include/trace/events/jbd2.h
> @@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
>  	TP_STRUCT__entry(
>  		__field(	dev_t,	dev			)
>  		__field(	char,	sync_commit		  )
> -		__field(	int,	transaction		  )
> +		__field(	tid_t,	transaction		  )
>  	),
>  
>  	TP_fast_assign(
> @@ -49,7 +49,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
>  		__entry->transaction	= commit_transaction->t_tid;
>  	),
>  
> -	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 @@ TRACE_EVENT(jbd2_end_commit,
>  	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		  	  )
>  	),
>  
>  	TP_fast_assign(
> @@ -108,7 +108,7 @@ TRACE_EVENT(jbd2_end_commit,
>  		__entry->head		= journal->j_tail_sequence;
>  	),
>  
> -	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)
>  );
> -- 
> 2.19.1.6.gb485710b
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* 回复:[PATCH -next] jbd2: use the correct print format
  2022-03-21  9:25 ` Jan Kara
@ 2022-04-22  2:42   ` cuibixuan
  2022-04-22  9:14     ` Jan Kara
  0 siblings, 1 reply; 5+ messages in thread
From: cuibixuan @ 2022-04-22  2:42 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-kernel, rostedt, mingo, yi.zhang, jack

Hi, 
This patch doesn't seem to be merged into the next branch.  :-)

Thanks,
Bixuan Cui

On Fri 18-03-22 23:56:40, Bixuan Cui wrote:

> The print format error was found when using ftrace event:
>     <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368
>     <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0
> 
> Print transaction and head with the unsigned format "%u" instead.
> 
> Fixes: 879c5e6b7cb4 ('jbd2: convert instrumentation from markers to tracepoints')
> Signed-off-by: Bixuan Cui <cuibixuan@linux.alibaba.com>

Makes sense. Thanks for the fix. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

        Honza

> ---
>  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 a4dfe005983d..5be1aa1691fb 100644
> --- a/include/trace/events/jbd2.h
> +++ b/include/trace/events/jbd2.h
> @@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
>   TP_STRUCT__entry(
>    __field( dev_t, dev   )
>    __field( char, sync_commit    )
> -  __field( int, transaction    )
> +  __field( tid_t, transaction    )
>   ),
>  
>   TP_fast_assign(
> @@ -49,7 +49,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
>    __entry->transaction = commit_transaction->t_tid;
>   ),
>  
> - 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 @@ TRACE_EVENT(jbd2_end_commit,
>   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       )
>   ),
>  
>   TP_fast_assign(
> @@ -108,7 +108,7 @@ TRACE_EVENT(jbd2_end_commit,
>    __entry->head  = journal->j_tail_sequence;
>   ),
>  
> - 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)
>  );
> -- 
> 2.19.1.6.gb485710b
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: 回复:[PATCH -next] jbd2: use the correct print format
  2022-04-22  2:42   ` 回复:[PATCH " cuibixuan
@ 2022-04-22  9:14     ` Jan Kara
  2022-04-25 12:03       ` Bixuan Cui
  0 siblings, 1 reply; 5+ messages in thread
From: Jan Kara @ 2022-04-22  9:14 UTC (permalink / raw)
  To: cuibixuan
  Cc: Jan Kara, linux-kernel, rostedt, mingo, yi.zhang, linux-ext4, Ted Tso

Hello,

thanks for noticing. It is probably because this patch was not CCed neither
to ext4 development mailing list, nor to the ext4 maintainer. Added now.
Ted, can you please pick up this patch? Lore has it so b4, can pick it up
just fine. Thanks!

								Honza

On Fri 22-04-22 10:42:51, cuibixuan wrote:
> Hi, 
> This patch doesn't seem to be merged into the next branch.  :-)
> 
> Thanks,
> Bixuan Cui
> 
> On Fri 18-03-22 23:56:40, Bixuan Cui wrote:
> 
> > The print format error was found when using ftrace event:
> >     <...>-1406 [000] .... 23599442.895823: jbd2_end_commit: dev 252,8 transaction -1866216965 sync 0 head -1866217368
> >     <...>-1406 [000] .... 23599442.896299: jbd2_start_commit: dev 252,8 transaction -1866216964 sync 0
> > 
> > Print transaction and head with the unsigned format "%u" instead.
> > 
> > Fixes: 879c5e6b7cb4 ('jbd2: convert instrumentation from markers to tracepoints')
> > Signed-off-by: Bixuan Cui <cuibixuan@linux.alibaba.com>
> 
> Makes sense. Thanks for the fix. Feel free to add:
> 
> Reviewed-by: Jan Kara <jack@suse.cz>
> 
>         Honza
> 
> > ---
> >  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 a4dfe005983d..5be1aa1691fb 100644
> > --- a/include/trace/events/jbd2.h
> > +++ b/include/trace/events/jbd2.h
> > @@ -40,7 +40,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
> >   TP_STRUCT__entry(
> >    __field( dev_t, dev   )
> >    __field( char, sync_commit    )
> > -  __field( int, transaction    )
> > +  __field( tid_t, transaction    )
> >   ),
> >  
> >   TP_fast_assign(
> > @@ -49,7 +49,7 @@ DECLARE_EVENT_CLASS(jbd2_commit,
> >    __entry->transaction = commit_transaction->t_tid;
> >   ),
> >  
> > - 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 @@ TRACE_EVENT(jbd2_end_commit,
> >   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       )
> >   ),
> >  
> >   TP_fast_assign(
> > @@ -108,7 +108,7 @@ TRACE_EVENT(jbd2_end_commit,
> >    __entry->head  = journal->j_tail_sequence;
> >   ),
> >  
> > - 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)
> >  );
> > -- 
> > 2.19.1.6.gb485710b
> > 
> -- 
> Jan Kara <jack@suse.com>
> SUSE Labs, CR
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

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

* Re: 回复:[PATCH -next] jbd2: use the correct print format
  2022-04-22  9:14     ` Jan Kara
@ 2022-04-25 12:03       ` Bixuan Cui
  0 siblings, 0 replies; 5+ messages in thread
From: Bixuan Cui @ 2022-04-25 12:03 UTC (permalink / raw)
  To: Jan Kara; +Cc: linux-kernel, rostedt, mingo, yi.zhang, linux-ext4, Ted Tso

Thanks. :-)


Bixuan Cui

在 2022/4/22 下午5:14, Jan Kara 写道:
> Hello,
>
> thanks for noticing. It is probably because this patch was not CCed neither
> to ext4 development mailing list, nor to the ext4 maintainer. Added now.
> Ted, can you please pick up this patch? Lore has it so b4, can pick it up
> just fine. Thanks!

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

end of thread, other threads:[~2022-04-25 12:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 15:56 [PATCH -next] jbd2: use the correct print format Bixuan Cui
2022-03-21  9:25 ` Jan Kara
2022-04-22  2:42   ` 回复:[PATCH " cuibixuan
2022-04-22  9:14     ` Jan Kara
2022-04-25 12:03       ` Bixuan Cui

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

Powered by JetHome