Commit 2201c590 authored by Seiji Aguchi's avatar Seiji Aguchi Committed by Theodore Ts'o

jbd2: add drop_transaction/update_superblock_end tracepoints

This patch adds trace_jbd2_drop_transaction and
trace_jbd2_update_superblock_end because there are similar tracepoints
in jbd and they are needed in jbd2 as well.
Reviewed-by: default avatarLukas Czerner <lczerner@redhat.com>
Signed-off-by: default avatarSeiji Aguchi <seiji.aguchi@hds.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 3d2b1582
...@@ -797,5 +797,7 @@ void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transact ...@@ -797,5 +797,7 @@ void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transact
J_ASSERT(journal->j_committing_transaction != transaction); J_ASSERT(journal->j_committing_transaction != transaction);
J_ASSERT(journal->j_running_transaction != transaction); J_ASSERT(journal->j_running_transaction != transaction);
trace_jbd2_drop_transaction(journal, transaction);
jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid); jbd_debug(1, "Dropping transaction %d, all done\n", transaction->t_tid);
} }
...@@ -1185,6 +1185,8 @@ void jbd2_journal_update_superblock(journal_t *journal, int wait) ...@@ -1185,6 +1185,8 @@ void jbd2_journal_update_superblock(journal_t *journal, int wait)
} else } else
write_dirty_buffer(bh, WRITE); write_dirty_buffer(bh, WRITE);
trace_jbd2_update_superblock_end(journal, wait);
out: out:
/* If we have just flushed the log (by marking s_start==0), then /* If we have just flushed the log (by marking s_start==0), then
* any future commit will have to be careful to update the * any future commit will have to be careful to update the
......
...@@ -81,6 +81,13 @@ DEFINE_EVENT(jbd2_commit, jbd2_commit_logging, ...@@ -81,6 +81,13 @@ DEFINE_EVENT(jbd2_commit, jbd2_commit_logging,
TP_ARGS(journal, commit_transaction) TP_ARGS(journal, commit_transaction)
); );
DEFINE_EVENT(jbd2_commit, jbd2_drop_transaction,
TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
TP_ARGS(journal, commit_transaction)
);
TRACE_EVENT(jbd2_end_commit, TRACE_EVENT(jbd2_end_commit,
TP_PROTO(journal_t *journal, transaction_t *commit_transaction), TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
...@@ -229,6 +236,27 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, ...@@ -229,6 +236,27 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
__entry->block_nr, __entry->freed) __entry->block_nr, __entry->freed)
); );
TRACE_EVENT(jbd2_update_superblock_end,
TP_PROTO(journal_t *journal, int wait),
TP_ARGS(journal, wait),
TP_STRUCT__entry(
__field( dev_t, dev )
__field( int, wait )
),
TP_fast_assign(
__entry->dev = journal->j_fs_dev->bd_dev;
__entry->wait = wait;
),
TP_printk("dev %d,%d wait %d",
MAJOR(__entry->dev), MINOR(__entry->dev),
__entry->wait)
);
#endif /* _TRACE_JBD2_H */ #endif /* _TRACE_JBD2_H */
/* This part must be outside protection */ /* This part must be outside protection */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment