aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/fs.h13
-rw-r--r--include/linux/jbd2.h12
-rw-r--r--include/linux/journal-head.h2
-rw-r--r--include/trace/events/jbd2.h29
4 files changed, 41 insertions, 15 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index fa63f1b46103..c437f914d537 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1872,19 +1872,6 @@ extern struct dentry *mount_pseudo(struct file_system_type *, char *,
1872 const struct dentry_operations *dops, 1872 const struct dentry_operations *dops,
1873 unsigned long); 1873 unsigned long);
1874 1874
1875static inline void sb_mark_dirty(struct super_block *sb)
1876{
1877 sb->s_dirt = 1;
1878}
1879static inline void sb_mark_clean(struct super_block *sb)
1880{
1881 sb->s_dirt = 0;
1882}
1883static inline int sb_is_dirty(struct super_block *sb)
1884{
1885 return sb->s_dirt;
1886}
1887
1888/* Alas, no aliases. Too much hassle with bringing module.h everywhere */ 1875/* Alas, no aliases. Too much hassle with bringing module.h everywhere */
1889#define fops_get(fops) \ 1876#define fops_get(fops) \
1890 (((fops) && try_module_get((fops)->owner) ? (fops) : NULL)) 1877 (((fops) && try_module_get((fops)->owner) ? (fops) : NULL))
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h
index 5557baefed60..912c30a8ddb1 100644
--- a/include/linux/jbd2.h
+++ b/include/linux/jbd2.h
@@ -971,6 +971,10 @@ extern void __journal_clean_data_list(transaction_t *transaction);
971/* Log buffer allocation */ 971/* Log buffer allocation */
972extern struct journal_head * jbd2_journal_get_descriptor_buffer(journal_t *); 972extern struct journal_head * jbd2_journal_get_descriptor_buffer(journal_t *);
973int jbd2_journal_next_log_block(journal_t *, unsigned long long *); 973int jbd2_journal_next_log_block(journal_t *, unsigned long long *);
974int jbd2_journal_get_log_tail(journal_t *journal, tid_t *tid,
975 unsigned long *block);
976void __jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block);
977void jbd2_update_log_tail(journal_t *journal, tid_t tid, unsigned long block);
974 978
975/* Commit management */ 979/* Commit management */
976extern void jbd2_journal_commit_transaction(journal_t *); 980extern void jbd2_journal_commit_transaction(journal_t *);
@@ -1020,6 +1024,11 @@ jbd2_journal_write_metadata_buffer(transaction_t *transaction,
1020/* Transaction locking */ 1024/* Transaction locking */
1021extern void __wait_on_journal (journal_t *); 1025extern void __wait_on_journal (journal_t *);
1022 1026
1027/* Transaction cache support */
1028extern void jbd2_journal_destroy_transaction_cache(void);
1029extern int jbd2_journal_init_transaction_cache(void);
1030extern void jbd2_journal_free_transaction(transaction_t *);
1031
1023/* 1032/*
1024 * Journal locking. 1033 * Journal locking.
1025 * 1034 *
@@ -1082,7 +1091,8 @@ extern int jbd2_journal_destroy (journal_t *);
1082extern int jbd2_journal_recover (journal_t *journal); 1091extern int jbd2_journal_recover (journal_t *journal);
1083extern int jbd2_journal_wipe (journal_t *, int); 1092extern int jbd2_journal_wipe (journal_t *, int);
1084extern int jbd2_journal_skip_recovery (journal_t *); 1093extern int jbd2_journal_skip_recovery (journal_t *);
1085extern void jbd2_journal_update_superblock (journal_t *, int); 1094extern void jbd2_journal_update_sb_log_tail (journal_t *, tid_t,
1095 unsigned long, int);
1086extern void __jbd2_journal_abort_hard (journal_t *); 1096extern void __jbd2_journal_abort_hard (journal_t *);
1087extern void jbd2_journal_abort (journal_t *, int); 1097extern void jbd2_journal_abort (journal_t *, int);
1088extern int jbd2_journal_errno (journal_t *); 1098extern int jbd2_journal_errno (journal_t *);
diff --git a/include/linux/journal-head.h b/include/linux/journal-head.h
index 423cb6d78ee0..c18b46f8aeeb 100644
--- a/include/linux/journal-head.h
+++ b/include/linux/journal-head.h
@@ -66,6 +66,8 @@ struct journal_head {
66 * transaction (if there is one). Only applies to buffers on a 66 * transaction (if there is one). Only applies to buffers on a
67 * transaction's data or metadata journaling list. 67 * transaction's data or metadata journaling list.
68 * [j_list_lock] [jbd_lock_bh_state()] 68 * [j_list_lock] [jbd_lock_bh_state()]
69 * Either of these locks is enough for reading, both are needed for
70 * changes.
69 */ 71 */
70 transaction_t *b_transaction; 72 transaction_t *b_transaction;
71 73
diff --git a/include/trace/events/jbd2.h b/include/trace/events/jbd2.h
index 75964412ddbb..127993dbf322 100644
--- a/include/trace/events/jbd2.h
+++ b/include/trace/events/jbd2.h
@@ -81,6 +81,13 @@ DEFINE_EVENT(jbd2_commit, jbd2_commit_logging,
81 TP_ARGS(journal, commit_transaction) 81 TP_ARGS(journal, commit_transaction)
82); 82);
83 83
84DEFINE_EVENT(jbd2_commit, jbd2_drop_transaction,
85
86 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
87
88 TP_ARGS(journal, commit_transaction)
89);
90
84TRACE_EVENT(jbd2_end_commit, 91TRACE_EVENT(jbd2_end_commit,
85 TP_PROTO(journal_t *journal, transaction_t *commit_transaction), 92 TP_PROTO(journal_t *journal, transaction_t *commit_transaction),
86 93
@@ -200,7 +207,7 @@ TRACE_EVENT(jbd2_checkpoint_stats,
200 __entry->forced_to_close, __entry->written, __entry->dropped) 207 __entry->forced_to_close, __entry->written, __entry->dropped)
201); 208);
202 209
203TRACE_EVENT(jbd2_cleanup_journal_tail, 210TRACE_EVENT(jbd2_update_log_tail,
204 211
205 TP_PROTO(journal_t *journal, tid_t first_tid, 212 TP_PROTO(journal_t *journal, tid_t first_tid,
206 unsigned long block_nr, unsigned long freed), 213 unsigned long block_nr, unsigned long freed),
@@ -229,6 +236,26 @@ TRACE_EVENT(jbd2_cleanup_journal_tail,
229 __entry->block_nr, __entry->freed) 236 __entry->block_nr, __entry->freed)
230); 237);
231 238
239TRACE_EVENT(jbd2_write_superblock,
240
241 TP_PROTO(journal_t *journal, int write_op),
242
243 TP_ARGS(journal, write_op),
244
245 TP_STRUCT__entry(
246 __field( dev_t, dev )
247 __field( int, write_op )
248 ),
249
250 TP_fast_assign(
251 __entry->dev = journal->j_fs_dev->bd_dev;
252 __entry->write_op = write_op;
253 ),
254
255 TP_printk("dev %d,%d write_op %x", MAJOR(__entry->dev),
256 MINOR(__entry->dev), __entry->write_op)
257);
258
232#endif /* _TRACE_JBD2_H */ 259#endif /* _TRACE_JBD2_H */
233 260
234/* This part must be outside protection */ 261/* This part must be outside protection */