diff options
| author | Theodore Ts'o <tytso@mit.edu> | 2008-10-05 20:50:06 -0400 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2008-10-05 20:50:06 -0400 |
| commit | ede86cc473defab74d778aeac14b19f43129d4d1 (patch) | |
| tree | 19da8009accf1737171f5949413e46a9086d5fdc /fs/jbd2 | |
| parent | 23f8b79eae8a74e42a006ffa7c456e295c7e1c0d (diff) | |
ext4: Add debugging markers that can be used by systemtap
This debugging markers are designed to debug problems such as the
random filesystem latency problems reported by Arjan.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
| -rw-r--r-- | fs/jbd2/checkpoint.c | 3 | ||||
| -rw-r--r-- | fs/jbd2/commit.c | 6 |
2 files changed, 9 insertions, 0 deletions
diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index af4651bf3570..42895d369458 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/time.h> | 20 | #include <linux/time.h> |
| 21 | #include <linux/fs.h> | 21 | #include <linux/fs.h> |
| 22 | #include <linux/jbd2.h> | 22 | #include <linux/jbd2.h> |
| 23 | #include <linux/marker.h> | ||
| 23 | #include <linux/errno.h> | 24 | #include <linux/errno.h> |
| 24 | #include <linux/slab.h> | 25 | #include <linux/slab.h> |
| 25 | 26 | ||
| @@ -328,6 +329,8 @@ int jbd2_log_do_checkpoint(journal_t *journal) | |||
| 328 | * journal straight away. | 329 | * journal straight away. |
| 329 | */ | 330 | */ |
| 330 | result = jbd2_cleanup_journal_tail(journal); | 331 | result = jbd2_cleanup_journal_tail(journal); |
| 332 | trace_mark(jbd2_checkpoint, "dev %s need_checkpoint %d", | ||
| 333 | journal->j_devname, result); | ||
| 331 | jbd_debug(1, "cleanup_journal_tail returned %d\n", result); | 334 | jbd_debug(1, "cleanup_journal_tail returned %d\n", result); |
| 332 | if (result <= 0) | 335 | if (result <= 0) |
| 333 | return result; | 336 | return result; |
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index b091e5378fe0..e91f051a9859 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -16,6 +16,7 @@ | |||
| 16 | #include <linux/time.h> | 16 | #include <linux/time.h> |
| 17 | #include <linux/fs.h> | 17 | #include <linux/fs.h> |
| 18 | #include <linux/jbd2.h> | 18 | #include <linux/jbd2.h> |
| 19 | #include <linux/marker.h> | ||
| 19 | #include <linux/errno.h> | 20 | #include <linux/errno.h> |
| 20 | #include <linux/slab.h> | 21 | #include <linux/slab.h> |
| 21 | #include <linux/mm.h> | 22 | #include <linux/mm.h> |
| @@ -368,6 +369,8 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 368 | commit_transaction = journal->j_running_transaction; | 369 | commit_transaction = journal->j_running_transaction; |
| 369 | J_ASSERT(commit_transaction->t_state == T_RUNNING); | 370 | J_ASSERT(commit_transaction->t_state == T_RUNNING); |
| 370 | 371 | ||
| 372 | trace_mark(jbd2_start_commit, "dev %s transaction %d", | ||
| 373 | journal->j_devname, commit_transaction->t_tid); | ||
| 371 | jbd_debug(1, "JBD: starting commit of transaction %d\n", | 374 | jbd_debug(1, "JBD: starting commit of transaction %d\n", |
| 372 | commit_transaction->t_tid); | 375 | commit_transaction->t_tid); |
| 373 | 376 | ||
| @@ -985,6 +988,9 @@ restart_loop: | |||
| 985 | } | 988 | } |
| 986 | spin_unlock(&journal->j_list_lock); | 989 | spin_unlock(&journal->j_list_lock); |
| 987 | 990 | ||
| 991 | trace_mark(jbd2_end_commit, "dev %s transaction %d head %d", | ||
| 992 | journal->j_devname, commit_transaction->t_tid, | ||
| 993 | journal->j_tail_sequence); | ||
| 988 | jbd_debug(1, "JBD: commit %d complete, head %d\n", | 994 | jbd_debug(1, "JBD: commit %d complete, head %d\n", |
| 989 | journal->j_commit_sequence, journal->j_tail_sequence); | 995 | journal->j_commit_sequence, journal->j_tail_sequence); |
| 990 | 996 | ||
