diff options
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r-- | include/linux/jbd2.h | 38 |
1 files changed, 35 insertions, 3 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index 34456476e761..b45109c61fba 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -638,6 +638,11 @@ struct transaction_s | |||
638 | unsigned long t_expires; | 638 | unsigned long t_expires; |
639 | 639 | ||
640 | /* | 640 | /* |
641 | * When this transaction started, in nanoseconds [no locking] | ||
642 | */ | ||
643 | ktime_t t_start_time; | ||
644 | |||
645 | /* | ||
641 | * How many handles used this transaction? [t_handle_lock] | 646 | * How many handles used this transaction? [t_handle_lock] |
642 | */ | 647 | */ |
643 | int t_handle_count; | 648 | int t_handle_count; |
@@ -682,6 +687,8 @@ jbd2_time_diff(unsigned long start, unsigned long end) | |||
682 | return end + (MAX_JIFFY_OFFSET - start); | 687 | return end + (MAX_JIFFY_OFFSET - start); |
683 | } | 688 | } |
684 | 689 | ||
690 | #define JBD2_NR_BATCH 64 | ||
691 | |||
685 | /** | 692 | /** |
686 | * struct journal_s - The journal_s type is the concrete type associated with | 693 | * struct journal_s - The journal_s type is the concrete type associated with |
687 | * journal_t. | 694 | * journal_t. |
@@ -826,6 +833,14 @@ struct journal_s | |||
826 | struct mutex j_checkpoint_mutex; | 833 | struct mutex j_checkpoint_mutex; |
827 | 834 | ||
828 | /* | 835 | /* |
836 | * List of buffer heads used by the checkpoint routine. This | ||
837 | * was moved from jbd2_log_do_checkpoint() to reduce stack | ||
838 | * usage. Access to this array is controlled by the | ||
839 | * j_checkpoint_mutex. [j_checkpoint_mutex] | ||
840 | */ | ||
841 | struct buffer_head *j_chkpt_bhs[JBD2_NR_BATCH]; | ||
842 | |||
843 | /* | ||
829 | * Journal head: identifies the first unused block in the journal. | 844 | * Journal head: identifies the first unused block in the journal. |
830 | * [j_state_lock] | 845 | * [j_state_lock] |
831 | */ | 846 | */ |
@@ -939,8 +954,26 @@ struct journal_s | |||
939 | struct buffer_head **j_wbuf; | 954 | struct buffer_head **j_wbuf; |
940 | int j_wbufsize; | 955 | int j_wbufsize; |
941 | 956 | ||
957 | /* | ||
958 | * this is the pid of hte last person to run a synchronous operation | ||
959 | * through the journal | ||
960 | */ | ||
942 | pid_t j_last_sync_writer; | 961 | pid_t j_last_sync_writer; |
943 | 962 | ||
963 | /* | ||
964 | * the average amount of time in nanoseconds it takes to commit a | ||
965 | * transaction to disk. [j_state_lock] | ||
966 | */ | ||
967 | u64 j_average_commit_time; | ||
968 | |||
969 | /* | ||
970 | * minimum and maximum times that we should wait for | ||
971 | * additional filesystem operations to get batched into a | ||
972 | * synchronous handle in microseconds | ||
973 | */ | ||
974 | u32 j_min_batch_time; | ||
975 | u32 j_max_batch_time; | ||
976 | |||
944 | /* This function is called when a transaction is closed */ | 977 | /* This function is called when a transaction is closed */ |
945 | void (*j_commit_callback)(journal_t *, | 978 | void (*j_commit_callback)(journal_t *, |
946 | transaction_t *); | 979 | transaction_t *); |
@@ -1102,7 +1135,6 @@ extern int jbd2_journal_set_features | |||
1102 | (journal_t *, unsigned long, unsigned long, unsigned long); | 1135 | (journal_t *, unsigned long, unsigned long, unsigned long); |
1103 | extern void jbd2_journal_clear_features | 1136 | extern void jbd2_journal_clear_features |
1104 | (journal_t *, unsigned long, unsigned long, unsigned long); | 1137 | (journal_t *, unsigned long, unsigned long, unsigned long); |
1105 | extern int jbd2_journal_create (journal_t *); | ||
1106 | extern int jbd2_journal_load (journal_t *journal); | 1138 | extern int jbd2_journal_load (journal_t *journal); |
1107 | extern int jbd2_journal_destroy (journal_t *); | 1139 | extern int jbd2_journal_destroy (journal_t *); |
1108 | extern int jbd2_journal_recover (journal_t *journal); | 1140 | extern int jbd2_journal_recover (journal_t *journal); |
@@ -1177,8 +1209,8 @@ int jbd2_log_wait_commit(journal_t *journal, tid_t tid); | |||
1177 | int jbd2_log_do_checkpoint(journal_t *journal); | 1209 | int jbd2_log_do_checkpoint(journal_t *journal); |
1178 | 1210 | ||
1179 | void __jbd2_log_wait_for_space(journal_t *journal); | 1211 | void __jbd2_log_wait_for_space(journal_t *journal); |
1180 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); | 1212 | extern void __jbd2_journal_drop_transaction(journal_t *, transaction_t *); |
1181 | extern int jbd2_cleanup_journal_tail(journal_t *); | 1213 | extern int jbd2_cleanup_journal_tail(journal_t *); |
1182 | 1214 | ||
1183 | /* Debugging code only: */ | 1215 | /* Debugging code only: */ |
1184 | 1216 | ||