aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jbd2
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2008-06-06 17:50:40 -0400
committerTheodore Ts'o <tytso@mit.edu>2008-06-06 17:50:40 -0400
commit624080eded68738daee041ad64672a9d2614754f (patch)
treec1350c70233c1f7536a1927bacabe4084770d3c7 /fs/jbd2
parent8ea76900be3b4522396e2021260d2818a27b3a5b (diff)
jbd2: If a journal checksum error is detected, propagate the error to ext4
If a journal checksum error is detected, the ext4 filesystem will call ext4_error(), and the mount will either continue, become a read-only mount, or cause a kernel panic based on the superblock flags indicating the user's preference of what to do in case of filesystem corruption being detected. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/jbd2')
-rw-r--r--fs/jbd2/recovery.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
index 7199db52b2fd..058f50f65b76 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -611,9 +611,8 @@ static int do_one_pass(journal_t *journal,
611 chksum_err = chksum_seen = 0; 611 chksum_err = chksum_seen = 0;
612 612
613 if (info->end_transaction) { 613 if (info->end_transaction) {
614 printk(KERN_ERR "JBD: Transaction %u " 614 journal->j_failed_commit =
615 "found to be corrupt.\n", 615 info->end_transaction;
616 next_commit_ID - 1);
617 brelse(bh); 616 brelse(bh);
618 break; 617 break;
619 } 618 }
@@ -644,10 +643,8 @@ static int do_one_pass(journal_t *journal,
644 643
645 if (!JBD2_HAS_INCOMPAT_FEATURE(journal, 644 if (!JBD2_HAS_INCOMPAT_FEATURE(journal,
646 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){ 645 JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){
647 printk(KERN_ERR 646 journal->j_failed_commit =
648 "JBD: Transaction %u " 647 next_commit_ID;
649 "found to be corrupt.\n",
650 next_commit_ID);
651 brelse(bh); 648 brelse(bh);
652 break; 649 break;
653 } 650 }