diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-17 21:51:42 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-17 21:51:42 -0500 |
commit | c58310bf4933986513020fa90b4190c7492995ae (patch) | |
tree | 143f2c7578d02ebef5db8fc57ae69e951ae0e2ee /fs/jbd | |
parent | 269cdfaf769f5cd831284cc831790c7c5038040f (diff) | |
parent | 1309d4e68497184d2fd87e892ddf14076c2bda98 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs/jbd')
-rw-r--r-- | fs/jbd/commit.c | 17 | ||||
-rw-r--r-- | fs/jbd/journal.c | 2 | ||||
-rw-r--r-- | fs/jbd/recovery.c | 2 |
3 files changed, 10 insertions, 11 deletions
diff --git a/fs/jbd/commit.c b/fs/jbd/commit.c index 31853eb65b4c..a38c7186c570 100644 --- a/fs/jbd/commit.c +++ b/fs/jbd/commit.c | |||
@@ -104,7 +104,8 @@ static int journal_write_commit_record(journal_t *journal, | |||
104 | { | 104 | { |
105 | struct journal_head *descriptor; | 105 | struct journal_head *descriptor; |
106 | struct buffer_head *bh; | 106 | struct buffer_head *bh; |
107 | int i, ret; | 107 | journal_header_t *header; |
108 | int ret; | ||
108 | int barrier_done = 0; | 109 | int barrier_done = 0; |
109 | 110 | ||
110 | if (is_journal_aborted(journal)) | 111 | if (is_journal_aborted(journal)) |
@@ -116,13 +117,10 @@ static int journal_write_commit_record(journal_t *journal, | |||
116 | 117 | ||
117 | bh = jh2bh(descriptor); | 118 | bh = jh2bh(descriptor); |
118 | 119 | ||
119 | /* AKPM: buglet - add `i' to tmp! */ | 120 | header = (journal_header_t *)(bh->b_data); |
120 | for (i = 0; i < bh->b_size; i += 512) { | 121 | header->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER); |
121 | journal_header_t *tmp = (journal_header_t*)bh->b_data; | 122 | header->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK); |
122 | tmp->h_magic = cpu_to_be32(JFS_MAGIC_NUMBER); | 123 | header->h_sequence = cpu_to_be32(commit_transaction->t_tid); |
123 | tmp->h_blocktype = cpu_to_be32(JFS_COMMIT_BLOCK); | ||
124 | tmp->h_sequence = cpu_to_be32(commit_transaction->t_tid); | ||
125 | } | ||
126 | 124 | ||
127 | JBUFFER_TRACE(descriptor, "write commit block"); | 125 | JBUFFER_TRACE(descriptor, "write commit block"); |
128 | set_buffer_dirty(bh); | 126 | set_buffer_dirty(bh); |
@@ -131,6 +129,8 @@ static int journal_write_commit_record(journal_t *journal, | |||
131 | barrier_done = 1; | 129 | barrier_done = 1; |
132 | } | 130 | } |
133 | ret = sync_dirty_buffer(bh); | 131 | ret = sync_dirty_buffer(bh); |
132 | if (barrier_done) | ||
133 | clear_buffer_ordered(bh); | ||
134 | /* is it possible for another commit to fail at roughly | 134 | /* is it possible for another commit to fail at roughly |
135 | * the same time as this one? If so, we don't want to | 135 | * the same time as this one? If so, we don't want to |
136 | * trust the barrier flag in the super, but instead want | 136 | * trust the barrier flag in the super, but instead want |
@@ -148,7 +148,6 @@ static int journal_write_commit_record(journal_t *journal, | |||
148 | spin_unlock(&journal->j_state_lock); | 148 | spin_unlock(&journal->j_state_lock); |
149 | 149 | ||
150 | /* And try again, without the barrier */ | 150 | /* And try again, without the barrier */ |
151 | clear_buffer_ordered(bh); | ||
152 | set_buffer_uptodate(bh); | 151 | set_buffer_uptodate(bh); |
153 | set_buffer_dirty(bh); | 152 | set_buffer_dirty(bh); |
154 | ret = sync_dirty_buffer(bh); | 153 | ret = sync_dirty_buffer(bh); |
diff --git a/fs/jbd/journal.c b/fs/jbd/journal.c index 5d14243499d4..3943a8905eb2 100644 --- a/fs/jbd/journal.c +++ b/fs/jbd/journal.c | |||
@@ -1457,7 +1457,7 @@ static const char *journal_dev_name(journal_t *journal, char *buffer) | |||
1457 | * Aborts hard --- we mark the abort as occurred, but do _nothing_ else, | 1457 | * Aborts hard --- we mark the abort as occurred, but do _nothing_ else, |
1458 | * and don't attempt to make any other journal updates. | 1458 | * and don't attempt to make any other journal updates. |
1459 | */ | 1459 | */ |
1460 | void __journal_abort_hard(journal_t *journal) | 1460 | static void __journal_abort_hard(journal_t *journal) |
1461 | { | 1461 | { |
1462 | transaction_t *transaction; | 1462 | transaction_t *transaction; |
1463 | char b[BDEVNAME_SIZE]; | 1463 | char b[BDEVNAME_SIZE]; |
diff --git a/fs/jbd/recovery.c b/fs/jbd/recovery.c index c5d9694b6a2f..2b8edf4d6eaa 100644 --- a/fs/jbd/recovery.c +++ b/fs/jbd/recovery.c | |||
@@ -354,7 +354,7 @@ static int do_one_pass(journal_t *journal, | |||
354 | struct buffer_head * obh; | 354 | struct buffer_head * obh; |
355 | struct buffer_head * nbh; | 355 | struct buffer_head * nbh; |
356 | 356 | ||
357 | cond_resched(); /* We're under lock_kernel() */ | 357 | cond_resched(); |
358 | 358 | ||
359 | /* If we already know where to stop the log traversal, | 359 | /* If we already know where to stop the log traversal, |
360 | * check right now that we haven't gone past the end of | 360 | * check right now that we haven't gone past the end of |