From c0a083fac3b8f03ae15f5bf30c230c015538051e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 7 Aug 2001 10:17:41 -0400 Subject: [PATCH] * journal.c (recover_ext3_journal): If s_errno is set in the journal superblock, set the EXT2_ERROR_FS flag in the filesystem superblock after the journal is run. --- e2fsck/ChangeLog | 6 ++++++ e2fsck/journal.c | 10 ++++++++++ 2 files changed, 16 insertions(+) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 6c79a0e..b64f036 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,9 @@ +2001-08-07 Theodore Tso + + * journal.c (recover_ext3_journal): If s_errno is set in the + journal superblock, set the EXT2_ERROR_FS flag in the + filesystem superblock after the journal is run. + 2001-08-04 Andreas Dilger * message.c: Change comments for %D and %d expansion in e2fsck diff --git a/e2fsck/journal.c b/e2fsck/journal.c index b44b60a..fd71921 100644 --- a/e2fsck/journal.c +++ b/e2fsck/journal.c @@ -652,6 +652,16 @@ static errcode_t recover_ext3_journal(e2fsck_t ctx) goto errout; retval = -journal_recover(journal); + if (retval) + goto errout; + + if (journal->j_superblock->s_errno) { + ctx->fs->super->s_state |= EXT2_ERROR_FS; + ext2fs_mark_super_dirty(ctx->fs); + journal->j_superblock->s_errno = 0; + mark_buffer_dirty(journal->j_sb_buffer, 1); + } + errout: e2fsck_journal_release(ctx, journal, 1, 0); return retval; -- 1.8.3.1