FAILED: patch "[PATCH] jbd2: use the correct print format" failed to apply to 4.9-stable tree
Subsystems (2)
[email protected]
maintainerThe patch below does not apply to the 4.9-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
Possible dependencies:
d87a7b4c77a9 ("jbd2: use the correct print format")0094f981bbac ("jbd2: Provide trace event for handle restarts") fdc3ef882a5d ("jbd2: Reserve space for revoke descriptor blocks") ec8b6f600e49 ("jbd2: Factor out common parts of stopping and restarting a handle") 5559b2d81b51 ("jbd2: Drop pointless wakeup from jbd2_journal_stop()") dfaf5ffda227 ("jbd2: Reorganize jbd2_journal_stop()")a9a8344ee171 ("ext4, jbd2: Provide accessor function for handle credits") a413036791d0 ("ext4: Provide function to handle transaction restarts") 538bcaa6261b ("jbd2: fix race when writing superblock")32ea275008d8 ("jbd2: update locking documentation for transaction_t") 0b02f4c0d6d9 ("ext4: fix reserved cluster accounting at delayed write time") 1dc0aa46e74a ("ext4: add new pending reservation mechanism") ad431025aecd ("ext4: generalize extents status tree search functions") fb7c02445c49 ("ext4: pass -ESHUTDOWN code to jbd2 layer") a6d9946bb925 ("ext4: eliminate sleep from shutdown ioctl") f69120ce6c02 ("jbd2: fix sphinx kernel-doc build warnings") d77147ff443b ("ext4: add support for online resizing with bigalloc") 545052e9e35a ("ext4: Switch to iomap for SEEK_HOLE / SEEK_DATA") 19fe5f643f89 ("iomap: Switch from blkno to disk offset")d34fc1adf01f ("Merge branch 'akpm' (patches from Andrew)")
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d87a7b4c77a997d5388566dd511ca8e6b8e8a0a8 Mon Sep 17 00:00:00 2001
From: Bixuan Cui <[email protected]>
Date: Tue, 11 Oct 2022 19:33:44 +0800
Subject: [PATCH] jbd2: use the correct print format
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 0Use the correct print format for transaction, head and tid.
include/trace/events/jbd2.h +22 -22
@@ -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) );
@@ -134,14 +134,14 @@ TRACE_EVENT(jbd2_submit_inode_data, ); DECLARE_EVENT_CLASS(jbd2_handle_start_class, - TP_PROTO(dev_t dev, unsigned long tid, unsigned int type, + TP_PROTO(dev_t dev, tid_t tid, unsigned int type, unsigned int line_no, int requested_blocks), TP_ARGS(dev, tid, type, line_no, requested_blocks), TP_STRUCT__entry( __field( dev_t, dev ) - __field( unsigned long, tid ) + __field( tid_t, tid ) __field( unsigned int, type ) __field( unsigned int, line_no ) __field( int, requested_blocks)
@@ -155,28 +155,28 @@ DECLARE_EVENT_CLASS(jbd2_handle_start_class, __entry->requested_blocks = requested_blocks; ), -TP_printk ("dev %d,%d tid %lu type %u line_no %u " +TP_printk ("dev %d,%d tid %u type %u line_no %u " "requested_blocks %d" ,MAJOR (__entry->dev),MINOR (__entry->dev), __entry->tid, __entry->type, __entry->line_no, __entry->requested_blocks) );DEFINE_EVENT (jbd2_handle_start_class, jbd2_handle_start, - TP_PROTO(dev_t dev, unsigned long tid, unsigned int type, + TP_PROTO(dev_t dev, tid_t tid, unsigned int type, unsigned int line_no, int requested_blocks),TP_ARGS (dev, tid, type, line_no, requested_blocks) );DEFINE_EVENT (jbd2_handle_start_class, jbd2_handle_restart, - TP_PROTO(dev_t dev, unsigned long tid, unsigned int type, + TP_PROTO(dev_t dev, tid_t tid, unsigned int type, unsigned int line_no, int requested_blocks),TP_ARGS (dev, tid, type, line_no, requested_blocks) ); TRACE_EVENT(jbd2_handle_extend, - TP_PROTO(dev_t dev, unsigned long tid, unsigned int type, + TP_PROTO(dev_t dev, tid_t tid, unsigned int type, unsigned int line_no, int buffer_credits, int requested_blocks),
@@ -184,7 +184,7 @@ TRACE_EVENT(jbd2_handle_extend,TP_STRUCT__entry (__field (dev_t ,dev ) - __field( unsigned long, tid ) +__field ( tid_t, tid ) __field( unsigned int, type ) __field( unsigned int, line_no ) __field( int, buffer_credits )
@@ -200,7 +200,7 @@ TRACE_EVENT(jbd2_handle_extend, __entry->requested_blocks = requested_blocks; ), - TP_printk("dev %d,%d tid %lu type %u line_no %u " + TP_printk("dev %d,%d tid %u type %u line_no %u " "buffer_credits %d requested_blocks %d", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid, __entry->type, __entry->line_no, __entry->buffer_credits,
@@ -208,7 +208,7 @@ TRACE_EVENT(jbd2_handle_extend, ); TRACE_EVENT(jbd2_handle_stats, - TP_PROTO(dev_t dev, unsigned long tid, unsigned int type, + TP_PROTO(dev_t dev, tid_t tid, unsigned int type, unsigned int line_no, int interval, int sync, int requested_blocks, int dirtied_blocks),
@@ -217,7 +217,7 @@ TRACE_EVENT(jbd2_handle_stats,TP_STRUCT__entry (__field (dev_t ,dev ) - __field( unsigned long, tid ) +__field ( tid_t, tid ) __field( unsigned int, type ) __field( unsigned int, line_no ) __field( int, interval )
@@ -237,7 +237,7 @@ TRACE_EVENT(jbd2_handle_stats, __entry->dirtied_blocks = dirtied_blocks; ), - TP_printk("dev %d,%d tid %lu type %u line_no %u interval %d " + TP_printk("dev %d,%d tid %u type %u line_no %u interval %d " "sync %d requested_blocks %d dirtied_blocks %d", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid, __entry->type, __entry->line_no, __entry->interval,
@@ -246,14 +246,14 @@ TRACE_EVENT(jbd2_handle_stats, ); TRACE_EVENT(jbd2_run_stats, - TP_PROTO(dev_t dev, unsigned long tid, + TP_PROTO(dev_t dev, tid_t tid, struct transaction_run_stats_s *stats), TP_ARGS(dev, tid, stats), TP_STRUCT__entry( __field( dev_t, dev ) - __field( unsigned long, tid ) + __field( tid_t, tid ) __field( unsigned long, wait ) __field( unsigned long, request_delay ) __field( unsigned long, running )
@@ -279,7 +279,7 @@ TRACE_EVENT(jbd2_run_stats, __entry->blocks_logged = stats->rs_blocks_logged; ), - TP_printk("dev %d,%d tid %lu wait %u request_delay %u running %u " + TP_printk("dev %d,%d tid %u wait %u request_delay %u running %u " "locked %u flushing %u logging %u handle_count %u " "blocks %u blocks_logged %u", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid,
@@ -294,14 +294,14 @@ TRACE_EVENT(jbd2_run_stats, ); TRACE_EVENT(jbd2_checkpoint_stats, - TP_PROTO(dev_t dev, unsigned long tid, + TP_PROTO(dev_t dev, tid_t tid, struct transaction_chp_stats_s *stats), TP_ARGS(dev, tid, stats), TP_STRUCT__entry( __field( dev_t, dev ) - __field( unsigned long, tid ) + __field( tid_t, tid ) __field( unsigned long, chp_time ) __field( __u32, forced_to_close ) __field( __u32, written )
@@ -317,7 +317,7 @@ TRACE_EVENT(jbd2_checkpoint_stats, __entry->dropped = stats->cs_dropped; ), - TP_printk("dev %d,%d tid %lu chp_time %u forced_to_close %u " + TP_printk("dev %d,%d tid %u chp_time %u forced_to_close %u " "written %u dropped %u", MAJOR(__entry->dev), MINOR(__entry->dev), __entry->tid, jiffies_to_msecs(__entry->chp_time),