Whamcloud - gitweb
* journal.c (recover_ext3_journal): If s_errno is set in the
authorTheodore Ts'o <tytso@mit.edu>
Tue, 7 Aug 2001 14:17:41 +0000 (10:17 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 7 Aug 2001 14:17:41 +0000 (10:17 -0400)
journal superblock, set the EXT2_ERROR_FS flag in the
filesystem superblock after the journal is run.

e2fsck/ChangeLog
e2fsck/journal.c

index 6c79a0e..b64f036 100644 (file)
@@ -1,3 +1,9 @@
+2001-08-07  Theodore Tso  <tytso@valinux.com>
+
+       * 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  <root@lynx.adilger.int>
 
        * message.c:  Change comments for %D and %d expansion in e2fsck
index b44b60a..fd71921 100644 (file)
@@ -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;