diff options
-rw-r--r-- | fs/jbd2/checkpoint.c | 1 | ||||
-rw-r--r-- | include/trace/events/jbd2.h | 28 |
2 files changed, 29 insertions, 0 deletions
diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 886849370950..30beb11ef928 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c | |||
@@ -507,6 +507,7 @@ int jbd2_cleanup_journal_tail(journal_t *journal) | |||
507 | if (blocknr < journal->j_tail) | 507 | if (blocknr < journal->j_tail) |
508 | freed = freed + journal->j_last - journal->j_first; | 508 | freed = freed + journal->j_last - journal->j_first; |
509 | 509 | ||
510 | trace_jbd2_cleanup_journal_tail(journal, first_tid, blocknr, freed); | ||
510 | jbd_debug(1, | 511 | jbd_debug(1, |
511 | "Cleaning journal tail from %d to %d (offset %lu), " | 512 | "Cleaning journal tail from %d to %d (offset %lu), " |
512 | "freeing %lu\n", | 513 | "freeing %lu\n", |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index 96b370a050de..bf16545cc977 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -199,6 +199,34 @@ TRACE_EVENT(jbd2_checkpoint_stats, | |||
199 | __entry->forced_to_close, __entry->written, __entry->dropped) | 199 | __entry->forced_to_close, __entry->written, __entry->dropped) |
200 | ); | 200 | ); |
201 | 201 | ||
202 | TRACE_EVENT(jbd2_cleanup_journal_tail, | ||
203 | |||
204 | TP_PROTO(journal_t *journal, tid_t first_tid, | ||
205 | unsigned long block_nr, unsigned long freed), | ||
206 | |||
207 | TP_ARGS(journal, first_tid, block_nr, freed), | ||
208 | |||
209 | TP_STRUCT__entry( | ||
210 | __field( dev_t, dev ) | ||
211 | __field( tid_t, tail_sequence ) | ||
212 | __field( tid_t, first_tid ) | ||
213 | __field(unsigned long, block_nr ) | ||
214 | __field(unsigned long, freed ) | ||
215 | ), | ||
216 | |||
217 | TP_fast_assign( | ||
218 | __entry->dev = journal->j_fs_dev->bd_dev; | ||
219 | __entry->tail_sequence = journal->j_tail_sequence; | ||
220 | __entry->first_tid = first_tid; | ||
221 | __entry->block_nr = block_nr; | ||
222 | __entry->freed = freed; | ||
223 | ), | ||
224 | |||
225 | TP_printk("dev %s from %u to %u offset %lu freed %lu", | ||
226 | jbd2_dev_to_name(__entry->dev), __entry->tail_sequence, | ||
227 | __entry->first_tid, __entry->block_nr, __entry->freed) | ||
228 | ); | ||
229 | |||
202 | #endif /* _TRACE_JBD2_H */ | 230 | #endif /* _TRACE_JBD2_H */ |
203 | 231 | ||
204 | /* This part must be outside protection */ | 232 | /* This part must be outside protection */ |