diff options
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r-- | include/linux/jbd2.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index c7d106ef22e2..34456476e761 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -329,6 +329,7 @@ enum jbd_state_bits { | |||
329 | BH_State, /* Pins most journal_head state */ | 329 | BH_State, /* Pins most journal_head state */ |
330 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ | 330 | BH_JournalHead, /* Pins bh->b_private and jh->b_bh */ |
331 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ | 331 | BH_Unshadow, /* Dummy bit, for BJ_Shadow wakeup filtering */ |
332 | BH_JBDPrivateStart, /* First bit available for private use by FS */ | ||
332 | }; | 333 | }; |
333 | 334 | ||
334 | BUFFER_FNS(JBD, jbd) | 335 | BUFFER_FNS(JBD, jbd) |
@@ -1007,6 +1008,35 @@ int __jbd2_journal_clean_checkpoint_list(journal_t *journal); | |||
1007 | int __jbd2_journal_remove_checkpoint(struct journal_head *); | 1008 | int __jbd2_journal_remove_checkpoint(struct journal_head *); |
1008 | void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); | 1009 | void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); |
1009 | 1010 | ||
1011 | |||
1012 | /* | ||
1013 | * Triggers | ||
1014 | */ | ||
1015 | |||
1016 | struct jbd2_buffer_trigger_type { | ||
1017 | /* | ||
1018 | * Fired just before a buffer is written to the journal. | ||
1019 | * mapped_data is a mapped buffer that is the frozen data for | ||
1020 | * commit. | ||
1021 | */ | ||
1022 | void (*t_commit)(struct jbd2_buffer_trigger_type *type, | ||
1023 | struct buffer_head *bh, void *mapped_data, | ||
1024 | size_t size); | ||
1025 | |||
1026 | /* | ||
1027 | * Fired during journal abort for dirty buffers that will not be | ||
1028 | * committed. | ||
1029 | */ | ||
1030 | void (*t_abort)(struct jbd2_buffer_trigger_type *type, | ||
1031 | struct buffer_head *bh); | ||
1032 | }; | ||
1033 | |||
1034 | extern void jbd2_buffer_commit_trigger(struct journal_head *jh, | ||
1035 | void *mapped_data, | ||
1036 | struct jbd2_buffer_trigger_type *triggers); | ||
1037 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, | ||
1038 | struct jbd2_buffer_trigger_type *triggers); | ||
1039 | |||
1010 | /* Buffer IO */ | 1040 | /* Buffer IO */ |
1011 | extern int | 1041 | extern int |
1012 | jbd2_journal_write_metadata_buffer(transaction_t *transaction, | 1042 | jbd2_journal_write_metadata_buffer(transaction_t *transaction, |
@@ -1045,6 +1075,8 @@ extern int jbd2_journal_extend (handle_t *, int nblocks); | |||
1045 | extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *); | 1075 | extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *); |
1046 | extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *); | 1076 | extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *); |
1047 | extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *); | 1077 | extern int jbd2_journal_get_undo_access(handle_t *, struct buffer_head *); |
1078 | void jbd2_journal_set_triggers(struct buffer_head *, | ||
1079 | struct jbd2_buffer_trigger_type *type); | ||
1048 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); | 1080 | extern int jbd2_journal_dirty_metadata (handle_t *, struct buffer_head *); |
1049 | extern void jbd2_journal_release_buffer (handle_t *, struct buffer_head *); | 1081 | extern void jbd2_journal_release_buffer (handle_t *, struct buffer_head *); |
1050 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); | 1082 | extern int jbd2_journal_forget (handle_t *, struct buffer_head *); |