Re: [PATCH e2fsprogs] - ignore bind mounts in fsck

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is what I actually committed into e2fsprogs git, in the maint
branch.  Note the one-line summary at the beginning of the patch
description, and the Addresses-Red-Hat-Bugzilla line before the
Signed-off-by lines.

						- Ted

commit ed773a263829493e4e4bf612dbec2380cf09349f
Author: Theodore Ts'o <tytso@xxxxxxx>
Date:   Thu Sep 20 15:06:35 2007 -0400

    fsck: Ignore /etc/fstab entries for bind mounts
    
    If a user specifies a bind mount with a non-zero fsck pass number, for
    example:
    
    /foo    /bar    ext3    bind,defaults   1 3
    
    print a warning and ignore the fstab entry.
    
    Addresses-Red-Hat-Bugzilla: #151533
    
    Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
    Signed-off-by: "Theodore Ts'o" <tytso@xxxxxxx>

diff --git a/misc/fsck.c b/misc/fsck.c
index 1dcac25..108adf6 100644
--- a/misc/fsck.c
+++ b/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,
+			_("%s: skipping bad line in /etc/fstab: bind mount with nonzero fsck pass number\n"),
+			fs->mountpt);
+		return 1;
+	}
+
 	interpret_type(fs);
 
 	/*
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux