diff options
author | Jan Kara <jack@suse.cz> | 2012-03-13 15:41:04 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2012-03-13 15:41:04 -0400 |
commit | 24bcc89c7e7c64982e6192b4952a0a92379fc341 (patch) | |
tree | 0661b6c83fa9bb681f3aa32264323ce96c264958 /include | |
parent | 31d4f3a2f3c73f279ff96a7135d7202ef6833f12 (diff) |
jbd2: split updating of journal superblock and marking journal empty
There are three case of updating journal superblock. In the first case, we want
to mark journal as empty (setting s_sequence to 0), in the second case we want
to update log tail, in the third case we want to update s_errno. Split these
cases into separate functions. It makes the code slightly more straightforward
and later patches will make the distinction even more important.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/jbd2.h | 2 | ||||
-rw-r--r-- | include/trace/events/jbd2.h | 12 |
2 files changed, 5 insertions, 9 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 46eef77e6ab8..5f05c77438e5 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -1087,7 +1087,7 @@ extern int jbd2_journal_destroy (journal_t *); | |||
1087 | extern int jbd2_journal_recover (journal_t *journal); | 1087 | extern int jbd2_journal_recover (journal_t *journal); |
1088 | extern int jbd2_journal_wipe (journal_t *, int); | 1088 | extern int jbd2_journal_wipe (journal_t *, int); |
1089 | extern int jbd2_journal_skip_recovery (journal_t *); | 1089 | extern int jbd2_journal_skip_recovery (journal_t *); |
1090 | extern void jbd2_journal_update_superblock (journal_t *, int); | 1090 | extern void jbd2_journal_update_sb_log_tail (journal_t *); |
1091 | extern void __jbd2_journal_abort_hard (journal_t *); | 1091 | extern void __jbd2_journal_abort_hard (journal_t *); |
1092 | extern void jbd2_journal_abort (journal_t *, int); | 1092 | extern void jbd2_journal_abort (journal_t *, int); |
1093 | extern int jbd2_journal_errno (journal_t *); | 1093 | extern int jbd2_journal_errno (journal_t *); |
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h index ae59bc207d70..e05a362bf3f1 100644 --- a/include/trace/events/jbd2.h +++ b/include/trace/events/jbd2.h | |||
@@ -236,25 +236,21 @@ TRACE_EVENT(jbd2_cleanup_journal_tail, | |||
236 | __entry->block_nr, __entry->freed) | 236 | __entry->block_nr, __entry->freed) |
237 | ); | 237 | ); |
238 | 238 | ||
239 | TRACE_EVENT(jbd2_update_superblock_end, | 239 | TRACE_EVENT(jbd2_write_superblock, |
240 | 240 | ||
241 | TP_PROTO(journal_t *journal, int wait), | 241 | TP_PROTO(journal_t *journal), |
242 | 242 | ||
243 | TP_ARGS(journal, wait), | 243 | TP_ARGS(journal), |
244 | 244 | ||
245 | TP_STRUCT__entry( | 245 | TP_STRUCT__entry( |
246 | __field( dev_t, dev ) | 246 | __field( dev_t, dev ) |
247 | __field( int, wait ) | ||
248 | ), | 247 | ), |
249 | 248 | ||
250 | TP_fast_assign( | 249 | TP_fast_assign( |
251 | __entry->dev = journal->j_fs_dev->bd_dev; | 250 | __entry->dev = journal->j_fs_dev->bd_dev; |
252 | __entry->wait = wait; | ||
253 | ), | 251 | ), |
254 | 252 | ||
255 | TP_printk("dev %d,%d wait %d", | 253 | TP_printk("dev %d,%d", MAJOR(__entry->dev), MINOR(__entry->dev)) |
256 | MAJOR(__entry->dev), MINOR(__entry->dev), | ||
257 | __entry->wait) | ||
258 | ); | 254 | ); |
259 | 255 | ||
260 | #endif /* _TRACE_JBD2_H */ | 256 | #endif /* _TRACE_JBD2_H */ |