diff options
author | Ram Pai <linuxram@us.ibm.com> | 2005-11-07 17:21:20 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-11-07 21:18:11 -0500 |
commit | 9676f0c6389b62bd6b24d77d4b3abdbcfa32d0f2 (patch) | |
tree | fd7d965c6d646cf7e4cfd35e866723927f6cfe8b /include | |
parent | 5afe00221389998a25d611dc7941c06580c29eb6 (diff) |
[PATCH] unbindable mounts
An unbindable mount does not forward or receive propagation. Also
unbindable mount disallows bind mounts. The semantics is as follows.
Bind semantics:
It is invalid to bind mount an unbindable mount.
Move semantics:
It is invalid to move an unbindable mount under shared mount.
Clone-namespace semantics:
If a mount is unbindable in the parent namespace, the corresponding
cloned mount in the child namespace becomes unbindable too. Note:
there is subtle difference, unbindable mounts cannot be bind mounted
but can be cloned during clone-namespace.
Signed-off-by: Ram Pai <linuxram@us.ibm.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 1 | ||||
-rw-r--r-- | include/linux/mount.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index eef66f54c017..1b5f502a4b8f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -104,6 +104,7 @@ extern int dir_notify_enable; | |||
104 | #define MS_MOVE 8192 | 104 | #define MS_MOVE 8192 |
105 | #define MS_REC 16384 | 105 | #define MS_REC 16384 |
106 | #define MS_VERBOSE 32768 | 106 | #define MS_VERBOSE 32768 |
107 | #define MS_UNBINDABLE (1<<17) /* change to unbindable */ | ||
107 | #define MS_PRIVATE (1<<18) /* change to private */ | 108 | #define MS_PRIVATE (1<<18) /* change to private */ |
108 | #define MS_SLAVE (1<<19) /* change to slave */ | 109 | #define MS_SLAVE (1<<19) /* change to slave */ |
109 | #define MS_SHARED (1<<20) /* change to shared */ | 110 | #define MS_SHARED (1<<20) /* change to shared */ |
diff --git a/include/linux/mount.h b/include/linux/mount.h index 7e133ae2a94f..dd4e83eba933 100644 --- a/include/linux/mount.h +++ b/include/linux/mount.h | |||
@@ -21,6 +21,7 @@ | |||
21 | #define MNT_NODEV 0x02 | 21 | #define MNT_NODEV 0x02 |
22 | #define MNT_NOEXEC 0x04 | 22 | #define MNT_NOEXEC 0x04 |
23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ | 23 | #define MNT_SHARED 0x10 /* if the vfsmount is a shared mount */ |
24 | #define MNT_UNBINDABLE 0x20 /* if the vfsmount is a unbindable mount */ | ||
24 | #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ | 25 | #define MNT_PNODE_MASK 0x30 /* propogation flag mask */ |
25 | 26 | ||
26 | struct vfsmount { | 27 | struct vfsmount { |