linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: jblunck@suse.de, bharata@in.ibm.com, vaurora@redhat.com,
	viro@zeniv.linux.org.uk
Subject: [patch 1/5] union-directory: Introduce MNT_UNION and MS_UNION flags
Date: Thu, 21 May 2009 11:22:32 +0200	[thread overview]
Message-ID: <20090521092246.999286876@szeredi.hu> (raw)
In-Reply-To: 20090521092231.979256687@szeredi.hu

[-- Attachment #1: union-mount-mount_flag.diff --]
[-- Type: text/plain, Size: 2694 bytes --]

From: Jan Blunck <jblunck@suse.de>

Add per mountpoint flag for Union Mount support. You need additional patches
to util-linux for that to work (ftp.suse.com/pub/people/jblunck/union-mount).

Signed-off-by: Jan Blunck <jblunck@suse.de>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
---
 fs/namespace.c        |    5 ++++-
 include/linux/fs.h    |    1 +
 include/linux/mount.h |    1 +
 3 files changed, 6 insertions(+), 1 deletion(-)

Index: linux-2.6/fs/namespace.c
===================================================================
--- linux-2.6.orig/fs/namespace.c	2009-05-20 15:05:15.000000000 +0200
+++ linux-2.6/fs/namespace.c	2009-05-20 15:07:46.000000000 +0200
@@ -796,6 +796,7 @@ static void show_mnt_opts(struct seq_fil
 		{ MNT_NODIRATIME, ",nodiratime" },
 		{ MNT_RELATIME, ",relatime" },
 		{ MNT_STRICTATIME, ",strictatime" },
+		{ MNT_UNION, ",union" },
 		{ 0, NULL }
 	};
 	const struct proc_fs_info *fs_infop;
@@ -1952,10 +1953,12 @@ long do_mount(char *dev_name, char *dir_
 		mnt_flags &= ~(MNT_RELATIME | MNT_NOATIME);
 	if (flags & MS_RDONLY)
 		mnt_flags |= MNT_READONLY;
+	if (flags & MS_UNION)
+		mnt_flags |= MNT_UNION;
 
 	flags &= ~(MS_NOSUID | MS_NOEXEC | MS_NODEV | MS_ACTIVE |
 		   MS_NOATIME | MS_NODIRATIME | MS_RELATIME| MS_KERNMOUNT |
-		   MS_STRICTATIME);
+		   MS_STRICTATIME | MS_UNION);
 
 	/* ... and get the mountpoint */
 	retval = kern_path(dir_name, LOOKUP_FOLLOW, &path);
Index: linux-2.6/include/linux/fs.h
===================================================================
--- linux-2.6.orig/include/linux/fs.h	2009-05-20 15:05:15.000000000 +0200
+++ linux-2.6/include/linux/fs.h	2009-05-20 15:07:46.000000000 +0200
@@ -188,6 +188,7 @@ struct inodes_stat_t {
 #define MS_REMOUNT	32	/* Alter flags of a mounted FS */
 #define MS_MANDLOCK	64	/* Allow mandatory locks on an FS */
 #define MS_DIRSYNC	128	/* Directory modifications are synchronous */
+#define MS_UNION	256
 #define MS_NOATIME	1024	/* Do not update access times. */
 #define MS_NODIRATIME	2048	/* Do not update directory access times */
 #define MS_BIND		4096
Index: linux-2.6/include/linux/mount.h
===================================================================
--- linux-2.6.orig/include/linux/mount.h	2009-05-20 15:05:15.000000000 +0200
+++ linux-2.6/include/linux/mount.h	2009-05-20 15:07:46.000000000 +0200
@@ -35,6 +35,7 @@ struct mnt_namespace;
 #define MNT_SHARED	0x1000	/* if the vfsmount is a shared mount */
 #define MNT_UNBINDABLE	0x2000	/* if the vfsmount is a unbindable mount */
 #define MNT_PNODE_MASK	0x3000	/* propagation flag mask */
+#define MNT_UNION	0x4000	/* if the vfsmount is a union mount */
 
 struct vfsmount {
 	struct list_head mnt_hash;

--

  reply	other threads:[~2009-05-21  9:23 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-21  9:22 [patch 0/5] union-directory implementation Miklos Szeredi
2009-05-21  9:22 ` Miklos Szeredi [this message]
2009-05-21  9:22 ` [patch 2/5] union-directory: Support for traversing the layers of a union-directory Miklos Szeredi
2009-05-21  9:22 ` [patch 3/5] union-directory: Some checks during namespace changes Miklos Szeredi
2009-05-21  9:22 ` [patch 4/5] union-directory: Make lookup continue in overlayed directories Miklos Szeredi
2009-05-21  9:22 ` [patch 5/5] union-directory: Simple union-mount readdir implementation Miklos Szeredi
2009-05-21  9:56 ` [patch 0/5] union-directory implementation Miklos Szeredi

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=20090521092246.999286876@szeredi.hu \
    --to=miklos@szeredi.hu \
    --cc=bharata@in.ibm.com \
    --cc=jblunck@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vaurora@redhat.com \
    --cc=viro@zeniv.linux.org.uk \
    /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).