summaryrefslogtreecommitdiffstats
path: root/fs/jbd2/recovery.c
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/recovery.c
parent8ea76900be3b4522396e2021260d2818a27b3a5b (diff)
downloadop-kernel-dev-624080eded68738daee041ad64672a9d2614754f.zip
op-kernel-dev-624080eded68738daee041ad64672a9d2614754f.tar.gz
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/recovery.c')
-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 7199db5..058f50f 100644
--- a/fs/jbd2/recovery.c
+++ b/fs/jbd2/recovery.c
@@ -611,9 +611,8 @@ static int do_one_pass(journal_t *journal,
chksum_err = chksum_seen = 0;
if (info->end_transaction) {
- printk(KERN_ERR "JBD: Transaction %u "
- "found to be corrupt.\n",
- next_commit_ID - 1);
+ journal->j_failed_commit =
+ info->end_transaction;
brelse(bh);
break;
}
@@ -644,10 +643,8 @@ static int do_one_pass(journal_t *journal,
if (!JBD2_HAS_INCOMPAT_FEATURE(journal,
JBD2_FEATURE_INCOMPAT_ASYNC_COMMIT)){
- printk(KERN_ERR
- "JBD: Transaction %u "
- "found to be corrupt.\n",
- next_commit_ID);
+ journal->j_failed_commit =
+ next_commit_ID;
brelse(bh);
break;
}
OpenPOWER on IntegriCloud