diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 16:03:53 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-07 16:03:53 -0400 |
| commit | 09dc942c2a767e2d298f1cc9294bc19c7d7208c5 (patch) | |
| tree | d310c118467c90c264e953bdc320ae08394c662a /fs/jbd2/checkpoint.c | |
| parent | 90e0c225968f0878e090c7ff3f88323973476cee (diff) | |
| parent | 6c7a120ac6c62316ab1fc78dfc0a7b13f3bfcbff (diff) | |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: (40 commits)
ext4: Adding error check after calling ext4_mb_regular_allocator()
ext4: Fix dirtying of journalled buffers in data=journal mode
ext4: re-inline ext4_rec_len_(to|from)_disk functions
jbd2: Remove t_handle_lock from start_this_handle()
jbd2: Change j_state_lock to be a rwlock_t
jbd2: Use atomic variables to avoid taking t_handle_lock in jbd2_journal_stop
ext4: Add mount options in superblock
ext4: force block allocation on quota_off
ext4: fix freeze deadlock under IO
ext4: drop inode from orphan list if ext4_delete_inode() fails
ext4: check to make make sure bd_dev is set before dereferencing it
jbd2: Make barrier messages less scary
ext4: don't print scary messages for allocation failures post-abort
ext4: fix EFBIG edge case when writing to large non-extent file
ext4: fix ext4_get_blocks references
ext4: Always journal quota file modifications
ext4: Fix potential memory leak in ext4_fill_super
ext4: Don't error out the fs if the user tries to make a file too big
ext4: allocate stripe-multiple IOs on stripe boundaries
ext4: move aio completion after unwritten extent conversion
...
Fix up conflicts in fs/ext4/inode.c as per Ted.
Fix up xfs conflicts as per earlier xfs merge.
Diffstat (limited to 'fs/jbd2/checkpoint.c')
| -rw-r--r-- | fs/jbd2/checkpoint.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 076d1cc44f95..1c23a0f4e8a3 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c | |||
| @@ -118,13 +118,13 @@ static int __try_to_free_cp_buf(struct journal_head *jh) | |||
| 118 | void __jbd2_log_wait_for_space(journal_t *journal) | 118 | void __jbd2_log_wait_for_space(journal_t *journal) |
| 119 | { | 119 | { |
| 120 | int nblocks, space_left; | 120 | int nblocks, space_left; |
| 121 | assert_spin_locked(&journal->j_state_lock); | 121 | /* assert_spin_locked(&journal->j_state_lock); */ |
| 122 | 122 | ||
| 123 | nblocks = jbd_space_needed(journal); | 123 | nblocks = jbd_space_needed(journal); |
| 124 | while (__jbd2_log_space_left(journal) < nblocks) { | 124 | while (__jbd2_log_space_left(journal) < nblocks) { |
| 125 | if (journal->j_flags & JBD2_ABORT) | 125 | if (journal->j_flags & JBD2_ABORT) |
| 126 | return; | 126 | return; |
| 127 | spin_unlock(&journal->j_state_lock); | 127 | write_unlock(&journal->j_state_lock); |
| 128 | mutex_lock(&journal->j_checkpoint_mutex); | 128 | mutex_lock(&journal->j_checkpoint_mutex); |
| 129 | 129 | ||
| 130 | /* | 130 | /* |
| @@ -138,7 +138,7 @@ void __jbd2_log_wait_for_space(journal_t *journal) | |||
| 138 | * filesystem, so abort the journal and leave a stack | 138 | * filesystem, so abort the journal and leave a stack |
| 139 | * trace for forensic evidence. | 139 | * trace for forensic evidence. |
| 140 | */ | 140 | */ |
| 141 | spin_lock(&journal->j_state_lock); | 141 | write_lock(&journal->j_state_lock); |
| 142 | spin_lock(&journal->j_list_lock); | 142 | spin_lock(&journal->j_list_lock); |
| 143 | nblocks = jbd_space_needed(journal); | 143 | nblocks = jbd_space_needed(journal); |
| 144 | space_left = __jbd2_log_space_left(journal); | 144 | space_left = __jbd2_log_space_left(journal); |
| @@ -149,7 +149,7 @@ void __jbd2_log_wait_for_space(journal_t *journal) | |||
| 149 | if (journal->j_committing_transaction) | 149 | if (journal->j_committing_transaction) |
| 150 | tid = journal->j_committing_transaction->t_tid; | 150 | tid = journal->j_committing_transaction->t_tid; |
| 151 | spin_unlock(&journal->j_list_lock); | 151 | spin_unlock(&journal->j_list_lock); |
| 152 | spin_unlock(&journal->j_state_lock); | 152 | write_unlock(&journal->j_state_lock); |
| 153 | if (chkpt) { | 153 | if (chkpt) { |
| 154 | jbd2_log_do_checkpoint(journal); | 154 | jbd2_log_do_checkpoint(journal); |
| 155 | } else if (jbd2_cleanup_journal_tail(journal) == 0) { | 155 | } else if (jbd2_cleanup_journal_tail(journal) == 0) { |
| @@ -167,7 +167,7 @@ void __jbd2_log_wait_for_space(journal_t *journal) | |||
| 167 | WARN_ON(1); | 167 | WARN_ON(1); |
| 168 | jbd2_journal_abort(journal, 0); | 168 | jbd2_journal_abort(journal, 0); |
| 169 | } | 169 | } |
| 170 | spin_lock(&journal->j_state_lock); | 170 | write_lock(&journal->j_state_lock); |
| 171 | } else { | 171 | } else { |
| 172 | spin_unlock(&journal->j_list_lock); | 172 | spin_unlock(&journal->j_list_lock); |
| 173 | } | 173 | } |
| @@ -474,7 +474,7 @@ int jbd2_cleanup_journal_tail(journal_t *journal) | |||
| 474 | * next transaction ID we will write, and where it will | 474 | * next transaction ID we will write, and where it will |
| 475 | * start. */ | 475 | * start. */ |
| 476 | 476 | ||
| 477 | spin_lock(&journal->j_state_lock); | 477 | write_lock(&journal->j_state_lock); |
| 478 | spin_lock(&journal->j_list_lock); | 478 | spin_lock(&journal->j_list_lock); |
| 479 | transaction = journal->j_checkpoint_transactions; | 479 | transaction = journal->j_checkpoint_transactions; |
| 480 | if (transaction) { | 480 | if (transaction) { |
| @@ -496,7 +496,7 @@ int jbd2_cleanup_journal_tail(journal_t *journal) | |||
| 496 | /* If the oldest pinned transaction is at the tail of the log | 496 | /* If the oldest pinned transaction is at the tail of the log |
| 497 | already then there's not much we can do right now. */ | 497 | already then there's not much we can do right now. */ |
| 498 | if (journal->j_tail_sequence == first_tid) { | 498 | if (journal->j_tail_sequence == first_tid) { |
| 499 | spin_unlock(&journal->j_state_lock); | 499 | write_unlock(&journal->j_state_lock); |
| 500 | return 1; | 500 | return 1; |
| 501 | } | 501 | } |
| 502 | 502 | ||
| @@ -516,7 +516,7 @@ int jbd2_cleanup_journal_tail(journal_t *journal) | |||
| 516 | journal->j_free += freed; | 516 | journal->j_free += freed; |
| 517 | journal->j_tail_sequence = first_tid; | 517 | journal->j_tail_sequence = first_tid; |
| 518 | journal->j_tail = blocknr; | 518 | journal->j_tail = blocknr; |
| 519 | spin_unlock(&journal->j_state_lock); | 519 | write_unlock(&journal->j_state_lock); |
| 520 | 520 | ||
| 521 | /* | 521 | /* |
| 522 | * If there is an external journal, we need to make sure that | 522 | * If there is an external journal, we need to make sure that |
| @@ -775,7 +775,7 @@ void __jbd2_journal_drop_transaction(journal_t *journal, transaction_t *transact | |||
| 775 | J_ASSERT(transaction->t_log_list == NULL); | 775 | J_ASSERT(transaction->t_log_list == NULL); |
| 776 | J_ASSERT(transaction->t_checkpoint_list == NULL); | 776 | J_ASSERT(transaction->t_checkpoint_list == NULL); |
| 777 | J_ASSERT(transaction->t_checkpoint_io_list == NULL); | 777 | J_ASSERT(transaction->t_checkpoint_io_list == NULL); |
| 778 | J_ASSERT(transaction->t_updates == 0); | 778 | J_ASSERT(atomic_read(&transaction->t_updates) == 0); |
| 779 | J_ASSERT(journal->j_committing_transaction != transaction); | 779 | J_ASSERT(journal->j_committing_transaction != transaction); |
| 780 | J_ASSERT(journal->j_running_transaction != transaction); | 780 | J_ASSERT(journal->j_running_transaction != transaction); |
| 781 | 781 | ||
