summaryrefslogtreecommitdiff
path: root/fs/jbd2
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2019-11-05 17:44:30 +0100
committerTheodore Ts'o <tytso@mit.edu>2019-11-05 16:00:49 -0500
commit0094f981bbaca3ae707c95c5e5977429d29c2dd0 (patch)
tree9f8af9460ef35d2585fe197c8146fa6167d3f69e /fs/jbd2
parent83448bdfb59731c2f54784ed3f4a93ff95be6e7e (diff)
jbd2: Provide trace event for handle restarts
Provide trace event for handle restarts to ease debugging. Reviewed-by: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Jan Kara <jack@suse.cz> Link: https://lore.kernel.org/r/20191105164437.32602-24-jack@suse.cz Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/transaction.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
index 8f11b2d48ca0..a3374c1a3d41 100644
--- a/fs/jbd2/transaction.c
+++ b/fs/jbd2/transaction.c
@@ -747,6 +747,7 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, int revoke_records,
journal_t *journal;
tid_t tid;
int need_to_start;
+ int ret;
/* If we've had an abort of any type, don't even think about
* actually doing the restart! */
@@ -776,7 +777,12 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, int revoke_records,
DIV_ROUND_UP(revoke_records,
journal->j_revoke_records_per_block);
handle->h_revoke_credits = revoke_records;
- return start_this_handle(journal, handle, gfp_mask);
+ ret = start_this_handle(journal, handle, gfp_mask);
+ trace_jbd2_handle_restart(journal->j_fs_dev->bd_dev,
+ ret ? 0 : handle->h_transaction->t_tid,
+ handle->h_type, handle->h_line_no,
+ handle->h_total_credits);
+ return ret;
}
EXPORT_SYMBOL(jbd2__journal_restart);