Re: [PATCH] Add MS_BIND_FLAGS mount flag

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <menage@...>
Cc: <miklos@...>, <viro@...>, <akpm@...>, <linux-kernel@...>, <linux-fsdevel@...>
Date: Thursday, February 14, 2008 - 1:31 pm

> >  Maybe instead of messing with masks, it's better to introduce a

Doh, you're right.

Let's try the original idea, but a bit cleaner:

/* flags: */
#define MNT_CTRL_RECURSE (1 << 0)

/* mnt_flags: */
#define MNT_NOSUID	0x01
#define MNT_NODEV	0x02
#define MNT_NOEXEC	0x04
#define MNT_NOATIME	0x08
#define MNT_NODIRATIME	0x10
#define MNT_RELATIME	0x20

#define MNT_SHARED	0x1000
#define MNT_UNBINDABLE	0x2000
#define MNT_PNODE_MASK	0x3000

struct mount_param {
	u64 flags;		/* control flags */
	u64 mnt_flags;		/* new mount flags */
	u64 mnt_flags_mask;	/* mask for new mount flags */
};

int mount_bindat(int fromfd, const char *frompath,
		int tofd, const char *topath,
		struct mount_param *param);

int mount_setflagsat(int fd, const char *path,
		struct mount_param *param);

int mount_moveat(int fromfd, const char *frompath,
		 int tofd, const char *topath);

...

I deliberately not used the MS_* flags, which is currently a messy mix
of things with totally different meanings.

Does this solve all the issues?

Miklos
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Add MS_BIND_FLAGS mount flag, Paul Menage, (Wed Feb 13, 1:45 am)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Miklos Szeredi, (Thu Feb 14, 4:30 am)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Paul Menage, (Thu Feb 14, 11:19 am)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Miklos Szeredi, (Thu Feb 14, 12:03 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Trond Myklebust, (Thu Feb 14, 12:26 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Miklos Szeredi, (Thu Feb 14, 1:39 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Trond Myklebust, (Thu Feb 14, 3:17 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Miklos Szeredi, (Thu Feb 14, 6:18 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Trond Myklebust, (Thu Feb 14, 7:33 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Paul Menage, (Thu Feb 14, 12:13 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Miklos Szeredi, (Thu Feb 14, 1:31 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Paul Menage, (Thu Feb 14, 2:05 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Miklos Szeredi, (Thu Feb 14, 6:30 pm)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Trond Myklebust, (Thu Feb 14, 9:06 am)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Christoph Hellwig, (Thu Feb 14, 2:02 am)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Paul Menage, (Thu Feb 14, 11:22 am)
Re: [PATCH] Add MS_BIND_FLAGS mount flag, Paul Menage, (Thu Feb 14, 11:23 am)