| 1 | #ifndef _UAPI_LINUX_MOUNT_H
|
| 2 | #define _UAPI_LINUX_MOUNT_H
|
| 3 |
|
| 4 | #include <linux/types.h>
|
| 5 |
|
| 6 | |
| 7 | * These are the fs-independent mount-flags: up to 32 flags are supported
|
| 8 | *
|
| 9 | * Usage of these is restricted within the kernel to core mount(2) code and
|
| 10 | * callers of sys_mount() only. Filesystems should be using the SB_*
|
| 11 | * equivalent instead.
|
| 12 |
|
| 13 | #define MS_RDONLY 1
|
| 14 | #define MS_NOSUID 2
|
| 15 | #define MS_NODEV 4
|
| 16 | #define MS_NOEXEC 8
|
| 17 | #define MS_SYNCHRONOUS 16
|
| 18 | #define MS_REMOUNT 32
|
| 19 | #define MS_MANDLOCK 64
|
| 20 | #define MS_DIRSYNC 128
|
| 21 | #define MS_NOSYMFOLLOW 256
|
| 22 | #define MS_NOATIME 1024
|
| 23 | #define MS_NODIRATIME 2048
|
| 24 | #define MS_BIND 4096
|
| 25 | #define MS_MOVE 8192
|
| 26 | #define MS_REC 16384
|
| 27 | #define MS_VERBOSE 32768 |
| 28 | MS_VERBOSE is deprecated.
|
| 29 | #define MS_SILENT 32768
|
| 30 | #define MS_POSIXACL (1<<16)
|
| 31 | #define MS_UNBINDABLE (1<<17)
|
| 32 | #define MS_PRIVATE (1<<18)
|
| 33 | #define MS_SLAVE (1<<19)
|
| 34 | #define MS_SHARED (1<<20)
|
| 35 | #define MS_RELATIME (1<<21)
|
| 36 | #define MS_KERNMOUNT (1<<22)
|
| 37 | #define MS_I_VERSION (1<<23)
|
| 38 | #define MS_STRICTATIME (1<<24)
|
| 39 | #define MS_LAZYTIME (1<<25)
|
| 40 |
|
| 41 |
|
| 42 | #define MS_SUBMOUNT (1<<26)
|
| 43 | #define MS_NOREMOTELOCK (1<<27)
|
| 44 | #define MS_NOSEC (1<<28)
|
| 45 | #define MS_BORN (1<<29)
|
| 46 | #define MS_ACTIVE (1<<30)
|
| 47 | #define MS_NOUSER (1<<31)
|
| 48 |
|
| 49 | |
| 50 | * Superblock flags that can be altered by MS_REMOUNT
|
| 51 |
|
| 52 | #define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION|\
|
| 53 | MS_LAZYTIME)
|
| 54 |
|
| 55 | |
| 56 | * Old magic mount flag and mask
|
| 57 |
|
| 58 | #define MS_MGC_VAL 0xC0ED0000
|
| 59 | #define MS_MGC_MSK 0xffff0000
|
| 60 |
|
| 61 | |
| 62 | * open_tree() flags.
|
| 63 |
|
| 64 | #define OPEN_TREE_CLONE 1
|
| 65 | #define OPEN_TREE_CLOEXEC O_CLOEXEC
|
| 66 |
|
| 67 | |
| 68 | * move_mount() flags.
|
| 69 |
|
| 70 | #define MOVE_MOUNT_F_SYMLINKS 0x00000001
|
| 71 | #define MOVE_MOUNT_F_AUTOMOUNTS 0x00000002
|
| 72 | #define MOVE_MOUNT_F_EMPTY_PATH 0x00000004
|
| 73 | #define MOVE_MOUNT_T_SYMLINKS 0x00000010
|
| 74 | #define MOVE_MOUNT_T_AUTOMOUNTS 0x00000020
|
| 75 | #define MOVE_MOUNT_T_EMPTY_PATH 0x00000040
|
| 76 | #define MOVE_MOUNT_SET_GROUP 0x00000100
|
| 77 | #define MOVE_MOUNT_BENEATH 0x00000200
|
| 78 | #define MOVE_MOUNT__MASK 0x00000377
|
| 79 |
|
| 80 | |
| 81 | * fsopen() flags.
|
| 82 |
|
| 83 | #define FSOPEN_CLOEXEC 0x00000001
|
| 84 |
|
| 85 | |
| 86 | * fspick() flags.
|
| 87 |
|
| 88 | #define FSPICK_CLOEXEC 0x00000001
|
| 89 | #define FSPICK_SYMLINK_NOFOLLOW 0x00000002
|
| 90 | #define FSPICK_NO_AUTOMOUNT 0x00000004
|
| 91 | #define FSPICK_EMPTY_PATH 0x00000008
|
| 92 |
|
| 93 | |
| 94 | * The type of fsconfig() call made.
|
| 95 |
|
| 96 | enum fsconfig_command {
|
| 97 | FSCONFIG_SET_FLAG = 0,
|
| 98 | FSCONFIG_SET_STRING = 1,
|
| 99 | FSCONFIG_SET_BINARY = 2,
|
| 100 | FSCONFIG_SET_PATH = 3,
|
| 101 | FSCONFIG_SET_PATH_EMPTY = 4,
|
| 102 | FSCONFIG_SET_FD = 5,
|
| 103 | FSCONFIG_CMD_CREATE = 6,
|
| 104 | FSCONFIG_CMD_RECONFIGURE = 7,
|
| 105 | };
|
| 106 |
|
| 107 | |
| 108 | * fsmount() flags.
|
| 109 |
|
| 110 | #define FSMOUNT_CLOEXEC 0x00000001
|
| 111 |
|
| 112 | |
| 113 | * Mount attributes.
|
| 114 |
|
| 115 | #define MOUNT_ATTR_RDONLY 0x00000001
|
| 116 | #define MOUNT_ATTR_NOSUID 0x00000002
|
| 117 | #define MOUNT_ATTR_NODEV 0x00000004
|
| 118 | #define MOUNT_ATTR_NOEXEC 0x00000008
|
| 119 | #define MOUNT_ATTR__ATIME 0x00000070
|
| 120 | #define MOUNT_ATTR_RELATIME 0x00000000
|
| 121 | #define MOUNT_ATTR_NOATIME 0x00000010
|
| 122 | #define MOUNT_ATTR_STRICTATIME 0x00000020
|
| 123 | #define MOUNT_ATTR_NODIRATIME 0x00000080
|
| 124 | #define MOUNT_ATTR_IDMAP 0x00100000
|
| 125 | #define MOUNT_ATTR_NOSYMFOLLOW 0x00200000
|
| 126 |
|
| 127 | |
| 128 | * mount_setattr()
|
| 129 |
|
| 130 | struct mount_attr {
|
| 131 | __u64 attr_set;
|
| 132 | __u64 attr_clr;
|
| 133 | __u64 propagation;
|
| 134 | __u64 userns_fd;
|
| 135 | };
|
| 136 |
|
| 137 |
|
| 138 | #define MOUNT_ATTR_SIZE_VER0 32
|
| 139 |
|
| 140 | #endif
|