diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 20:14:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 20:14:59 -0500 |
commit | 2150edc6c5cf00f7adb54538b9ea2a3e9cedca3f (patch) | |
tree | f72a0d85e66f500b4cead348a231e3d3b9f357bc /include/linux/jbd2.h | |
parent | cd764695b67386a81964f68e9c66efd9f13f4d29 (diff) | |
parent | 4b905671d2ea09fd48fed72c581df17e40823f39 (diff) |
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (57 commits)
jbd2: Fix oops in jbd2_journal_init_inode() on corrupted fs
ext4: Remove "extents" mount option
block: Add Kconfig help which notes that ext4 needs CONFIG_LBD
ext4: Make printk's consistently prefixed with "EXT4-fs: "
ext4: Add sanity checks for the superblock before mounting the filesystem
ext4: Add mount option to set kjournald's I/O priority
jbd2: Submit writes to the journal using WRITE_SYNC
jbd2: Add pid and journal device name to the "kjournald2 starting" message
ext4: Add markers for better debuggability
ext4: Remove code to create the journal inode
ext4: provide function to release metadata pages under memory pressure
ext3: provide function to release metadata pages under memory pressure
add releasepage hooks to block devices which can be used by file systems
ext4: Fix s_dirty_blocks_counter if block allocation failed with nodelalloc
ext4: Init the complete page while building buddy cache
ext4: Don't allow new groups to be added during block allocation
ext4: mark the blocks/inode bitmap beyond end of group as used
ext4: Use new buffer_head flag to check uninit group bitmaps initialization
ext4: Fix the race between read_inode_bitmap() and ext4_new_inode()
ext4: code cleanup
...
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 | ||