diff options
Diffstat (limited to 'fs/jbd2')
| -rw-r--r-- | fs/jbd2/checkpoint.c | 4 | ||||
| -rw-r--r-- | fs/jbd2/commit.c | 39 | ||||
| -rw-r--r-- | fs/jbd2/journal.c | 2 | ||||
| -rw-r--r-- | fs/jbd2/revoke.c | 2 |
4 files changed, 20 insertions, 27 deletions
diff --git a/fs/jbd2/checkpoint.c b/fs/jbd2/checkpoint.c index 1c23a0f4e8a3..5247e7ffdcb4 100644 --- a/fs/jbd2/checkpoint.c +++ b/fs/jbd2/checkpoint.c | |||
| @@ -255,7 +255,9 @@ __flush_batch(journal_t *journal, int *batch_count) | |||
| 255 | { | 255 | { |
| 256 | int i; | 256 | int i; |
| 257 | 257 | ||
| 258 | ll_rw_block(SWRITE, *batch_count, journal->j_chkpt_bhs); | 258 | for (i = 0; i < *batch_count; i++) |
| 259 | write_dirty_buffer(journal->j_chkpt_bhs[i], WRITE); | ||
| 260 | |||
| 259 | for (i = 0; i < *batch_count; i++) { | 261 | for (i = 0; i < *batch_count; i++) { |
| 260 | struct buffer_head *bh = journal->j_chkpt_bhs[i]; | 262 | struct buffer_head *bh = journal->j_chkpt_bhs[i]; |
| 261 | clear_buffer_jwrite(bh); | 263 | clear_buffer_jwrite(bh); |
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index f52e5e8049f1..7c068c189d80 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -101,7 +101,6 @@ static int journal_submit_commit_record(journal_t *journal, | |||
| 101 | struct commit_header *tmp; | 101 | struct commit_header *tmp; |
| 102 | struct buffer_head *bh; | 102 | struct buffer_head *bh; |
| 103 | int ret; | 103 | int ret; |
| 104 | int barrier_done = 0; | ||
| 105 | struct timespec now = current_kernel_time(); | 104 | struct timespec now = current_kernel_time(); |
| 106 | 105 | ||
| 107 | if (is_journal_aborted(journal)) | 106 | if (is_journal_aborted(journal)) |
| @@ -136,30 +135,22 @@ static int journal_submit_commit_record(journal_t *journal, | |||
| 136 | if (journal->j_flags & JBD2_BARRIER && | 135 | if (journal->j_flags & JBD2_BARRIER && |
| 137 | !JBD2_HAS_INCOMPAT_FEATURE(journal, | 136 | !JBD2_HAS_INCOMPAT_FEATURE(journal, |
| 138 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)) { | 137 | JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)) { |
| 139 | set_buffer_ordered(bh); | 138 | ret = submit_bh(WRITE_SYNC_PLUG | WRITE_BARRIER, bh); |
| 140 | barrier_done = 1; | 139 | if (ret == -EOPNOTSUPP) { |
| 141 | } | 140 | printk(KERN_WARNING |
| 142 | ret = submit_bh(WRITE_SYNC_PLUG, bh); | 141 | "JBD2: Disabling barriers on %s, " |
| 143 | if (barrier_done) | 142 | "not supported by device\n", journal->j_devname); |
| 144 | clear_buffer_ordered(bh); | 143 | write_lock(&journal->j_state_lock); |
| 145 | 144 | journal->j_flags &= ~JBD2_BARRIER; | |
| 146 | /* is it possible for another commit to fail at roughly | 145 | write_unlock(&journal->j_state_lock); |
| 147 | * the same time as this one? If so, we don't want to | ||
| 148 | * trust the barrier flag in the super, but instead want | ||
| 149 | * to remember if we sent a barrier request | ||
| 150 | */ | ||
| 151 | if (ret == -EOPNOTSUPP && barrier_done) { | ||
| 152 | printk(KERN_WARNING | ||
| 153 | "JBD2: Disabling barriers on %s, " | ||
| 154 | "not supported by device\n", journal->j_devname); | ||
| 155 | write_lock(&journal->j_state_lock); | ||
| 156 | journal->j_flags &= ~JBD2_BARRIER; | ||
| 157 | write_unlock(&journal->j_state_lock); | ||
| 158 | 146 | ||
| 159 | /* And try again, without the barrier */ | 147 | /* And try again, without the barrier */ |
| 160 | lock_buffer(bh); | 148 | lock_buffer(bh); |
| 161 | set_buffer_uptodate(bh); | 149 | set_buffer_uptodate(bh); |
| 162 | clear_buffer_dirty(bh); | 150 | clear_buffer_dirty(bh); |
| 151 | ret = submit_bh(WRITE_SYNC_PLUG, bh); | ||
| 152 | } | ||
| 153 | } else { | ||
| 163 | ret = submit_bh(WRITE_SYNC_PLUG, bh); | 154 | ret = submit_bh(WRITE_SYNC_PLUG, bh); |
| 164 | } | 155 | } |
| 165 | *cbh = bh; | 156 | *cbh = bh; |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index ad5866aaf0f9..0e8014ea6b94 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c | |||
| @@ -1124,7 +1124,7 @@ void jbd2_journal_update_superblock(journal_t *journal, int wait) | |||
| 1124 | set_buffer_uptodate(bh); | 1124 | set_buffer_uptodate(bh); |
| 1125 | } | 1125 | } |
| 1126 | } else | 1126 | } else |
| 1127 | ll_rw_block(SWRITE, 1, &bh); | 1127 | write_dirty_buffer(bh, WRITE); |
| 1128 | 1128 | ||
| 1129 | out: | 1129 | out: |
| 1130 | /* If we have just flushed the log (by marking s_start==0), then | 1130 | /* If we have just flushed the log (by marking s_start==0), then |
diff --git a/fs/jbd2/revoke.c b/fs/jbd2/revoke.c index a360b06af2e3..9ad321fd63fd 100644 --- a/fs/jbd2/revoke.c +++ b/fs/jbd2/revoke.c | |||
| @@ -625,7 +625,7 @@ static void flush_descriptor(journal_t *journal, | |||
| 625 | set_buffer_jwrite(bh); | 625 | set_buffer_jwrite(bh); |
| 626 | BUFFER_TRACE(bh, "write"); | 626 | BUFFER_TRACE(bh, "write"); |
| 627 | set_buffer_dirty(bh); | 627 | set_buffer_dirty(bh); |
| 628 | ll_rw_block((write_op == WRITE) ? SWRITE : SWRITE_SYNC_PLUG, 1, &bh); | 628 | write_dirty_buffer(bh, write_op); |
| 629 | } | 629 | } |
| 630 | #endif | 630 | #endif |
| 631 | 631 | ||
