From: Daniel Drake <ddrake@brontes3d.com>
To: tytso@mit.edu
Cc: linux-ext4@vger.kernel.org
Subject: [PATCH e2fsprogs] Restore backup superblocks in preen mode
Date: Tue, 8 May 2007 18:43:24 +0100 (BST) [thread overview]
Message-ID: <20070508174324.40EBE7B409F@zog.reactivated.net> (raw)
The restoration of backup superblocks seems to be reversed in the current
e2fsprogs:
When running without preen mode, e2fsck searches and locates a backup
superblock and fixes the primary superblock without any user intervention.
When running in preen mode, e2fsck prints a message describing how the user
can specify the location of a backup superblock, and exits without doing any
repair.
This patch corrects the issue.
Signed-off-by: Daniel Drake <d.drake@mmm.com>
Index: e2fsprogs-1.39/e2fsck/unix.c
===================================================================
--- e2fsprogs-1.39.orig/e2fsck/unix.c
+++ e2fsprogs-1.39/e2fsck/unix.c
@@ -932,7 +932,7 @@ restart:
} else
retval = ext2fs_open2(ctx->filesystem_name, ctx->io_options,
flags, 0, 0, io_ptr, &fs);
- if (!ctx->superblock && !(ctx->options & E2F_OPT_PREEN) &&
+ if (!ctx->superblock && (ctx->options & E2F_OPT_PREEN) &&
!(ctx->flags & E2F_FLAG_SB_SPECIFIED) &&
((retval == EXT2_ET_BAD_MAGIC) ||
((retval == 0) && ext2fs_check_desc(fs)))) {
next reply other threads:[~2007-05-08 17:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-08 17:43 Daniel Drake [this message]
2007-05-08 18:14 ` [PATCH e2fsprogs] Restore backup superblocks in preen mode Theodore Tso
2007-05-08 18:52 ` Daniel Drake
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070508174324.40EBE7B409F@zog.reactivated.net \
--to=ddrake@brontes3d.com \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).