]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ChangeLog, unix.c:
authorTheodore Ts'o <tytso@mit.edu>
Tue, 22 Aug 2000 21:50:04 +0000 (21:50 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 22 Aug 2000 21:50:04 +0000 (21:50 +0000)
  unix.c (main): If we're doing a read-only check, skip the journal
   playback, but don't abort the e2fsck run.

e2fsck/ChangeLog
e2fsck/unix.c

index de93ab1de14722e441499ee5c33e02ca34569210..7fd1f7a237a2146f9cdaa57840cf092c6419622f 100644 (file)
@@ -1,5 +1,8 @@
 2000-08-22    <tytso@valinux.com>
 
+       * unix.c (main): If we're doing a read-only check, skip the
+               journal playback, but don't abort the e2fsck run.
+
        * super.c (release_orphan_inodes): Fix typo; should do bounds
                checking on next_ino instead of ino.
 
index 1a258316c89874df4a3d9eda377346f97b576cf5..29e13f549e476140f0dd55c13c86921da0b5beb5 100644 (file)
@@ -808,16 +808,23 @@ restart:
        }
 
        if (s->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) {
-               retval = e2fsck_run_ext3_journal(ctx);
-               if (retval) {
-                       com_err(ctx->program_name, retval,
+               if (ctx->options & E2F_OPT_READONLY) {
+                       printf(_("Warning: skipping journal recovery "
+                                "because doing a read-only filesystem "
+                                "check.\n"));
+                       io_channel_flush(ctx->fs->io);
+               } else {
+                       retval = e2fsck_run_ext3_journal(ctx);
+                       if (retval) {
+                               com_err(ctx->program_name, retval,
                                _("while recovering ext3 journal of %s"),
-                               ctx->device_name);
-                       fatal_error(ctx, 0);
+                                       ctx->device_name);
+                               fatal_error(ctx, 0);
+                       }
+                       ext2fs_close(ctx->fs);
+                       ctx->fs = 0;
+                       goto restart;
                }
-               ext2fs_close(ctx->fs);
-               ctx->fs = 0;
-               goto restart;
        }
 
        /*