Skip to content

Commit 08f4c42

Browse files
riteshharjanitytso
authored andcommitted
ext4: add new trace event in ext4_fc_cleanup
This adds a new trace event in ext4_fc_cleanup() which is helpful in debugging some fast_commit issues. Signed-off-by: Ritesh Harjani <riteshh@linux.ibm.com> Link: https://lore.kernel.org/r/794cdb1d5d3622f3f80d30c222ff6652ea68c375.1647057583.git.riteshh@linux.ibm.com Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 parent 78be047 commit 08f4c42

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

fs/ext4/fast_commit.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,6 +1280,7 @@ static void ext4_fc_cleanup(journal_t *journal, int full, tid_t tid)
12801280
if (full && sbi->s_fc_bh)
12811281
sbi->s_fc_bh = NULL;
12821282

1283+
trace_ext4_fc_cleanup(journal, full, tid);
12831284
jbd2_fc_release_bufs(journal);
12841285

12851286
spin_lock(&sbi->s_fc_lock);

include/trace/events/ext4.h

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2863,6 +2863,32 @@ TRACE_EVENT(ext4_fc_track_range,
28632863
__entry->end)
28642864
);
28652865

2866+
TRACE_EVENT(ext4_fc_cleanup,
2867+
TP_PROTO(journal_t *journal, int full, tid_t tid),
2868+
2869+
TP_ARGS(journal, full, tid),
2870+
2871+
TP_STRUCT__entry(
2872+
__field(dev_t, dev)
2873+
__field(int, j_fc_off)
2874+
__field(int, full)
2875+
__field(tid_t, tid)
2876+
),
2877+
2878+
TP_fast_assign(
2879+
struct super_block *sb = journal->j_private;
2880+
2881+
__entry->dev = sb->s_dev;
2882+
__entry->j_fc_off = journal->j_fc_off;
2883+
__entry->full = full;
2884+
__entry->tid = tid;
2885+
),
2886+
2887+
TP_printk("dev %d,%d, j_fc_off %d, full %d, tid %u",
2888+
MAJOR(__entry->dev), MINOR(__entry->dev),
2889+
__entry->j_fc_off, __entry->full, __entry->tid)
2890+
);
2891+
28662892
TRACE_EVENT(ext4_update_sb,
28672893
TP_PROTO(struct super_block *sb, ext4_fsblk_t fsblk,
28682894
unsigned int flags),

0 commit comments

Comments
 (0)