History

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);

David Howells committed 8 years ago

Commit 2db154b1 parent a07b2008 files · +130 −32Browse files

Showing the changes to include/uapi/linux (1 of 8 files). Show all

Unified · Split

include/uapi/linux/mount.h+11−0
@@ -61,4 +61,15 @@ · 60 unmodified lines
61#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */61#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
62#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */62#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
63 63
64/*
65 * move_mount() flags.
66 */
67#define MOVE_MOUNT_F_SYMLINKS 0x00000001 /* Follow symlinks on from path */
68#define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002 /* Follow automounts on from path */
69#define MOVE_MOUNT_F_EMPTY_PATH 0x00000004 /* Empty from path permitted */
70#define MOVE_MOUNT_T_SYMLINKS 0x00000010 /* Follow symlinks on to path */
71#define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020 /* Follow automounts on to path */
72#define MOVE_MOUNT_T_EMPTY_PATH 0x00000040 /* Empty to path permitted */
73#define MOVE_MOUNT__MASK 0x00000077
74
64#endif /* _UAPI_LINUX_MOUNT_H */75#endif /* _UAPI_LINUX_MOUNT_H */