From: Theodore Ts'o Date: Tue, 7 Aug 2001 14:17:41 +0000 (-0400) Subject: * journal.c (recover_ext3_journal): If s_errno is set in the X-Git-Tag: E2FSPROGS-1_23~21 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c0a083fac3b8f03ae15f5bf30c230c015538051e;p=tools%2Fe2fsprogs.git * 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. --- 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;