diff options
author | Theodore Ts'o <tytso@mit.edu> | 2008-06-06 23:50:40 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-06-06 23:50:40 +0200 |
commit | 624080eded68738daee041ad64672a9d2614754f (patch) | |
tree | c1350c70233c1f7536a1927bacabe4084770d3c7 /fs/jbd2/recovery.c | |
parent | jbd2: Fix memory leak when verifying checksums in the journal (diff) | |
download | linux-624080eded68738daee041ad64672a9d2614754f.tar.xz linux-624080eded68738daee041ad64672a9d2614754f.zip |
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.c | 11 |
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, 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; } |