diff options
Diffstat (limited to 'include/linux/jbd2.h')
-rw-r--r-- | include/linux/jbd2.h | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/include/linux/jbd2.h b/include/linux/jbd2.h index a4d2e9f7088a..0b52924a0cb6 100644 --- a/include/linux/jbd2.h +++ b/include/linux/jbd2.h | |||
@@ -601,13 +601,13 @@ struct transaction_s | |||
601 | * Number of outstanding updates running on this transaction | 601 | * Number of outstanding updates running on this transaction |
602 | * [t_handle_lock] | 602 | * [t_handle_lock] |
603 | */ | 603 | */ |
604 | int t_updates; | 604 | atomic_t t_updates; |
605 | 605 | ||
606 | /* | 606 | /* |
607 | * Number of buffers reserved for use by all handles in this transaction | 607 | * Number of buffers reserved for use by all handles in this transaction |
608 | * handle but not yet modified. [t_handle_lock] | 608 | * handle but not yet modified. [t_handle_lock] |
609 | */ | 609 | */ |
610 | int t_outstanding_credits; | 610 | atomic_t t_outstanding_credits; |
611 | 611 | ||
612 | /* | 612 | /* |
613 | * Forward and backward links for the circular list of all transactions | 613 | * Forward and backward links for the circular list of all transactions |
@@ -629,7 +629,7 @@ struct transaction_s | |||
629 | /* | 629 | /* |
630 | * How many handles used this transaction? [t_handle_lock] | 630 | * How many handles used this transaction? [t_handle_lock] |
631 | */ | 631 | */ |
632 | int t_handle_count; | 632 | atomic_t t_handle_count; |
633 | 633 | ||
634 | /* | 634 | /* |
635 | * This transaction is being forced and some process is | 635 | * This transaction is being forced and some process is |
@@ -764,7 +764,7 @@ struct journal_s | |||
764 | /* | 764 | /* |
765 | * Protect the various scalars in the journal | 765 | * Protect the various scalars in the journal |
766 | */ | 766 | */ |
767 | spinlock_t j_state_lock; | 767 | rwlock_t j_state_lock; |
768 | 768 | ||
769 | /* | 769 | /* |
770 | * Number of processes waiting to create a barrier lock [j_state_lock] | 770 | * Number of processes waiting to create a barrier lock [j_state_lock] |
@@ -1026,11 +1026,12 @@ void __jbd2_journal_insert_checkpoint(struct journal_head *, transaction_t *); | |||
1026 | 1026 | ||
1027 | struct jbd2_buffer_trigger_type { | 1027 | struct jbd2_buffer_trigger_type { |
1028 | /* | 1028 | /* |
1029 | * Fired just before a buffer is written to the journal. | 1029 | * Fired a the moment data to write to the journal are known to be |
1030 | * mapped_data is a mapped buffer that is the frozen data for | 1030 | * stable - so either at the moment b_frozen_data is created or just |
1031 | * commit. | 1031 | * before a buffer is written to the journal. mapped_data is a mapped |
1032 | * buffer that is the frozen data for commit. | ||
1032 | */ | 1033 | */ |
1033 | void (*t_commit)(struct jbd2_buffer_trigger_type *type, | 1034 | void (*t_frozen)(struct jbd2_buffer_trigger_type *type, |
1034 | struct buffer_head *bh, void *mapped_data, | 1035 | struct buffer_head *bh, void *mapped_data, |
1035 | size_t size); | 1036 | size_t size); |
1036 | 1037 | ||
@@ -1042,7 +1043,7 @@ struct jbd2_buffer_trigger_type { | |||
1042 | struct buffer_head *bh); | 1043 | struct buffer_head *bh); |
1043 | }; | 1044 | }; |
1044 | 1045 | ||
1045 | extern void jbd2_buffer_commit_trigger(struct journal_head *jh, | 1046 | extern void jbd2_buffer_frozen_trigger(struct journal_head *jh, |
1046 | void *mapped_data, | 1047 | void *mapped_data, |
1047 | struct jbd2_buffer_trigger_type *triggers); | 1048 | struct jbd2_buffer_trigger_type *triggers); |
1048 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, | 1049 | extern void jbd2_buffer_abort_trigger(struct journal_head *jh, |
@@ -1081,7 +1082,9 @@ static inline handle_t *journal_current_handle(void) | |||
1081 | */ | 1082 | */ |
1082 | 1083 | ||
1083 | extern handle_t *jbd2_journal_start(journal_t *, int nblocks); | 1084 | extern handle_t *jbd2_journal_start(journal_t *, int nblocks); |
1084 | extern int jbd2_journal_restart (handle_t *, int nblocks); | 1085 | extern handle_t *jbd2__journal_start(journal_t *, int nblocks, int gfp_mask); |
1086 | extern int jbd2_journal_restart(handle_t *, int nblocks); | ||
1087 | extern int jbd2__journal_restart(handle_t *, int nblocks, int gfp_mask); | ||
1085 | extern int jbd2_journal_extend (handle_t *, int nblocks); | 1088 | extern int jbd2_journal_extend (handle_t *, int nblocks); |
1086 | extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *); | 1089 | extern int jbd2_journal_get_write_access(handle_t *, struct buffer_head *); |
1087 | extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *); | 1090 | extern int jbd2_journal_get_create_access (handle_t *, struct buffer_head *); |
@@ -1256,8 +1259,8 @@ static inline int jbd_space_needed(journal_t *journal) | |||
1256 | { | 1259 | { |
1257 | int nblocks = journal->j_max_transaction_buffers; | 1260 | int nblocks = journal->j_max_transaction_buffers; |
1258 | if (journal->j_committing_transaction) | 1261 | if (journal->j_committing_transaction) |
1259 | nblocks += journal->j_committing_transaction-> | 1262 | nblocks += atomic_read(&journal->j_committing_transaction-> |
1260 | t_outstanding_credits; | 1263 | t_outstanding_credits); |
1261 | return nblocks; | 1264 | return nblocks; |
1262 | } | 1265 | } |
1263 | 1266 | ||