linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH e2fsprogs] - ignore bind mounts in fsck
@ 2007-09-19 20:20 Eric Sandeen
  2007-09-19 20:42 ` Theodore Tso
  0 siblings, 1 reply; 7+ messages in thread
From: Eric Sandeen @ 2007-09-19 20:20 UTC (permalink / raw)
  To: ext4 development

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,12 @@ 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))
+		return 1;
+
 	interpret_type(fs);
 
 	/*

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-09-20 19:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-09-20 18:59         ` Theodore Tso
2007-09-20 19:08         ` Theodore Tso

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).