From: Eric Sandeen <sandeen@redhat.com>
To: Theodore Tso <tytso@mit.edu>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH e2fsprogs] - ignore bind mounts in fsck
Date: Thu, 20 Sep 2007 10:12:26 -0500 [thread overview]
Message-ID: <46F28DDA.9050203@redhat.com> (raw)
In-Reply-To: <20070920144245.GD30221@thunk.org>
Theodore Tso wrote:
> On Thu, Sep 20, 2007 at 09:31:56AM -0500, Eric Sandeen wrote:
>
>> Agreed. If you think fsck shouldn't silently cope with this mistake,
>> and instead punish the user for it (it is what they asked for, after
>> all), I'm ok with that too. I'm willing to close my end as NOTABUG if
>> you don't want to take this patch. :)
>>
>
> I'm willing to take the patch, although I am thinking that it might be
> appropriate for fsck to print a warning message --- "Bind mount with
> non-zero fsck pass, skipping", or some such.
>
> What do you think?
>
> - Ted
>
Yup, was thinking the same.
----------------
An entry like this in /etc/fstab:
/foo /bar ext3 bind,defaults 1 3
will stop boot, as fsck.ext3 tries to check it and fails:
e2fsck 1.40.2 (12-Jul-2007)
fsck.ext3: Is a directory while trying to open /foo
The superblock could not be read or does not describe a correct ext2
filesystem. ...
Granted, asking for fsck of a bind mount in the fstab is a bit odd,
but it doesn't seem like it should stop the boot process if you make
this mistake.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Index: e2fsprogs-1.40.2/misc/fsck.c
===================================================================
--- e2fsprogs-1.40.2.orig/misc/fsck.c
+++ e2fsprogs-1.40.2/misc/fsck.c
@@ -867,6 +867,16 @@ static int ignore(struct fs_info *fs)
if (fs->passno == 0)
return 1;
+ /*
+ * If this is a bind mount, ignore it.
+ */
+ if (opt_in_list("bind", fs->opts)) {
+ fprintf(stderr,
+ _("Skipping bind mount on %s with nonzero fsck pass\n"),
+ fs->mountpt);
+ return 1;
+ }
+
interpret_type(fs);
/*
next prev parent reply other threads:[~2007-09-20 15:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-19 20:20 [PATCH e2fsprogs] - ignore bind mounts in fsck Eric Sandeen
2007-09-19 20:42 ` Theodore Tso
2007-09-20 14:31 ` Eric Sandeen
2007-09-20 14:42 ` Theodore Tso
2007-09-20 15:12 ` Eric Sandeen [this message]
2007-09-20 18:59 ` Theodore Tso
2007-09-20 19:08 ` Theodore Tso
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=46F28DDA.9050203@redhat.com \
--to=sandeen@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.