summaryrefslogtreecommitdiffstats
path: root/include/uapi/linux/mount.h
diff options
context:
space:
mode:
authorDavid Howells2018-11-05 18:40:30 +0100
committerAl Viro2019-03-20 23:49:06 +0100
commit2db154b3ea8e14b04fee23e3fdfd5e9d17fbc6ae (patch)
treeb7c4c1f2497b6c04b3481fdfd461c652befbca6d /include/uapi/linux/mount.h
parentvfs: syscall: Add open_tree(2) to reference or clone a mount (diff)
downloadkernel-qcow2-linux-2db154b3ea8e14b04fee23e3fdfd5e9d17fbc6ae.tar.gz
kernel-qcow2-linux-2db154b3ea8e14b04fee23e3fdfd5e9d17fbc6ae.tar.xz
kernel-qcow2-linux-2db154b3ea8e14b04fee23e3fdfd5e9d17fbc6ae.zip
vfs: syscall: Add move_mount(2) to move mounts around
Add a move_mount() system call that will move a mount from one place to another and, in the next commit, allow to attach an unattached mount tree. The new system call looks like the following: int move_mount(int from_dfd, const char *from_path, int to_dfd, const char *to_path, unsigned int flags); Signed-off-by: David Howells <dhowells@redhat.com> cc: linux-api@vger.kernel.org Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/uapi/linux/mount.h')
-rw-r--r--include/uapi/linux/mount.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/mount.h b/include/uapi/linux/mount.h
index fd7ae2e7eccf..3634e065836c 100644
--- a/include/uapi/linux/mount.h
+++ b/include/uapi/linux/mount.h
@@ -61,4 +61,15 @@
#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
+/*
+ * move_mount() flags.
+ */
+#define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */
+#define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */
+#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */
+#define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */
+#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */
+#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
+#define MOVE_MOUNT__MASK 0x00000077
+
#endif /* _UAPI_LINUX_MOUNT_H */