diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-12 19:10:29 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-12 19:10:29 -0400 |
| commit | 3280fb313911a80b13de52d9fe37f39668f2138e (patch) | |
| tree | 6903a275ab00172a88cf51ab1d570e4a3e1a286b /fs/jbd2/commit.c | |
| parent | f1b2a5ace996de339292d4035f9f5b294aecd11e (diff) | |
| parent | f319fb8bf6899e08bdb8d1e09a4e7a129dfa2312 (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:
ext4: fix kconfig typo and extra whitespace
ext4: fix build failure without procfs
ext4: add an option to control error handling on file data
jbd2: don't dirty original metadata buffer on abort
ext4: add checks for errors from jbd2
jbd2: fix error handling for checkpoint io
jbd2: abort when failed to log metadata buffers
Diffstat (limited to 'fs/jbd2/commit.c')
| -rw-r--r-- | fs/jbd2/commit.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/jbd2/commit.c b/fs/jbd2/commit.c index 0d3814a35ed1..0abe02c4242a 100644 --- a/fs/jbd2/commit.c +++ b/fs/jbd2/commit.c | |||
| @@ -504,9 +504,10 @@ void jbd2_journal_commit_transaction(journal_t *journal) | |||
| 504 | jh = commit_transaction->t_buffers; | 504 | jh = commit_transaction->t_buffers; |
| 505 | 505 | ||
| 506 | /* If we're in abort mode, we just un-journal the buffer and | 506 | /* If we're in abort mode, we just un-journal the buffer and |
| 507 | release it for background writing. */ | 507 | release it. */ |
| 508 | 508 | ||
| 509 | if (is_journal_aborted(journal)) { | 509 | if (is_journal_aborted(journal)) { |
| 510 | clear_buffer_jbddirty(jh2bh(jh)); | ||
| 510 | JBUFFER_TRACE(jh, "journal is aborting: refile"); | 511 | JBUFFER_TRACE(jh, "journal is aborting: refile"); |
| 511 | jbd2_journal_refile_buffer(journal, jh); | 512 | jbd2_journal_refile_buffer(journal, jh); |
| 512 | /* If that was the last one, we need to clean up | 513 | /* If that was the last one, we need to clean up |
| @@ -683,6 +684,8 @@ start_journal_io: | |||
| 683 | printk(KERN_WARNING | 684 | printk(KERN_WARNING |
| 684 | "JBD2: Detected IO errors while flushing file data " | 685 | "JBD2: Detected IO errors while flushing file data " |
| 685 | "on %s\n", journal->j_devname); | 686 | "on %s\n", journal->j_devname); |
| 687 | if (journal->j_flags & JBD2_ABORT_ON_SYNCDATA_ERR) | ||
| 688 | jbd2_journal_abort(journal, err); | ||
| 686 | err = 0; | 689 | err = 0; |
| 687 | } | 690 | } |
| 688 | 691 | ||
| @@ -783,6 +786,9 @@ wait_for_iobuf: | |||
| 783 | /* AKPM: bforget here */ | 786 | /* AKPM: bforget here */ |
| 784 | } | 787 | } |
| 785 | 788 | ||
| 789 | if (err) | ||
| 790 | jbd2_journal_abort(journal, err); | ||
| 791 | |||
| 786 | jbd_debug(3, "JBD: commit phase 5\n"); | 792 | jbd_debug(3, "JBD: commit phase 5\n"); |
| 787 | 793 | ||
| 788 | if (!JBD2_HAS_INCOMPAT_FEATURE(journal, | 794 | if (!JBD2_HAS_INCOMPAT_FEATURE(journal, |
| @@ -881,6 +887,8 @@ restart_loop: | |||
| 881 | if (buffer_jbddirty(bh)) { | 887 | if (buffer_jbddirty(bh)) { |
| 882 | JBUFFER_TRACE(jh, "add to new checkpointing trans"); | 888 | JBUFFER_TRACE(jh, "add to new checkpointing trans"); |
| 883 | __jbd2_journal_insert_checkpoint(jh, commit_transaction); | 889 | __jbd2_journal_insert_checkpoint(jh, commit_transaction); |
| 890 | if (is_journal_aborted(journal)) | ||
| 891 | clear_buffer_jbddirty(bh); | ||
| 884 | JBUFFER_TRACE(jh, "refile for checkpoint writeback"); | 892 | JBUFFER_TRACE(jh, "refile for checkpoint writeback"); |
| 885 | __jbd2_journal_refile_buffer(jh); | 893 | __jbd2_journal_refile_buffer(jh); |
| 886 | jbd_unlock_bh_state(bh); | 894 | jbd_unlock_bh_state(bh); |
