hc
2024-05-13 9d77db3c730780c8ef5ccd4b66403ff5675cfe4e
kernel/include/uapi/linux/fs.h
....@@ -17,6 +17,11 @@
1717 #include <linux/fscrypt.h>
1818 #endif
1919
20
+/* Use of MS_* flags within the kernel is restricted to core mount(2) code. */
21
+#if !defined(__KERNEL__)
22
+#include <linux/mount.h>
23
+#endif
24
+
2025 /*
2126 * It's silly to have NR_OPEN bigger than NR_FILE, but you can change
2227 * the file limit at runtime and only root can increase the per-process
....@@ -103,57 +108,6 @@
103108
104109
105110 #define NR_FILE 8192 /* this can well be larger on a larger system */
106
-
107
-
108
-/*
109
- * These are the fs-independent mount-flags: up to 32 flags are supported
110
- */
111
-#define MS_RDONLY 1 /* Mount read-only */
112
-#define MS_NOSUID 2 /* Ignore suid and sgid bits */
113
-#define MS_NODEV 4 /* Disallow access to device special files */
114
-#define MS_NOEXEC 8 /* Disallow program execution */
115
-#define MS_SYNCHRONOUS 16 /* Writes are synced at once */
116
-#define MS_REMOUNT 32 /* Alter flags of a mounted FS */
117
-#define MS_MANDLOCK 64 /* Allow mandatory locks on an FS */
118
-#define MS_DIRSYNC 128 /* Directory modifications are synchronous */
119
-#define MS_NOATIME 1024 /* Do not update access times. */
120
-#define MS_NODIRATIME 2048 /* Do not update directory access times */
121
-#define MS_BIND 4096
122
-#define MS_MOVE 8192
123
-#define MS_REC 16384
124
-#define MS_VERBOSE 32768 /* War is peace. Verbosity is silence.
125
- MS_VERBOSE is deprecated. */
126
-#define MS_SILENT 32768
127
-#define MS_POSIXACL (1<<16) /* VFS does not apply the umask */
128
-#define MS_UNBINDABLE (1<<17) /* change to unbindable */
129
-#define MS_PRIVATE (1<<18) /* change to private */
130
-#define MS_SLAVE (1<<19) /* change to slave */
131
-#define MS_SHARED (1<<20) /* change to shared */
132
-#define MS_RELATIME (1<<21) /* Update atime relative to mtime/ctime. */
133
-#define MS_KERNMOUNT (1<<22) /* this is a kern_mount call */
134
-#define MS_I_VERSION (1<<23) /* Update inode I_version field */
135
-#define MS_STRICTATIME (1<<24) /* Always perform atime updates */
136
-#define MS_LAZYTIME (1<<25) /* Update the on-disk [acm]times lazily */
137
-
138
-/* These sb flags are internal to the kernel */
139
-#define MS_SUBMOUNT (1<<26)
140
-#define MS_NOREMOTELOCK (1<<27)
141
-#define MS_NOSEC (1<<28)
142
-#define MS_BORN (1<<29)
143
-#define MS_ACTIVE (1<<30)
144
-#define MS_NOUSER (1<<31)
145
-
146
-/*
147
- * Superblock flags that can be altered by MS_REMOUNT
148
- */
149
-#define MS_RMT_MASK (MS_RDONLY|MS_SYNCHRONOUS|MS_MANDLOCK|MS_I_VERSION|\
150
- MS_LAZYTIME)
151
-
152
-/*
153
- * Old magic mount flag and mask
154
- */
155
-#define MS_MGC_VAL 0xC0ED0000
156
-#define MS_MGC_MSK 0xffff0000
157111
158112 /*
159113 * Structure for FS_IOC_FSGETXATTR[A] and FS_IOC_FSSETXATTR.
....@@ -308,6 +262,7 @@
308262 #define FS_EA_INODE_FL 0x00200000 /* Inode used for large EA */
309263 #define FS_EOFBLOCKS_FL 0x00400000 /* Reserved for ext4 */
310264 #define FS_NOCOW_FL 0x00800000 /* Do not cow file */
265
+#define FS_DAX_FL 0x02000000 /* Inode is DAX */
311266 #define FS_INLINE_DATA_FL 0x10000000 /* Reserved for ext4 */
312267 #define FS_PROJINHERIT_FL 0x20000000 /* Create with parents projid */
313268 #define FS_CASEFOLD_FL 0x40000000 /* Folder is case insensitive */
....@@ -320,6 +275,9 @@
320275 #define SYNC_FILE_RANGE_WAIT_BEFORE 1
321276 #define SYNC_FILE_RANGE_WRITE 2
322277 #define SYNC_FILE_RANGE_WAIT_AFTER 4
278
+#define SYNC_FILE_RANGE_WRITE_AND_WAIT (SYNC_FILE_RANGE_WRITE | \
279
+ SYNC_FILE_RANGE_WAIT_BEFORE | \
280
+ SYNC_FILE_RANGE_WAIT_AFTER)
323281
324282 /*
325283 * Flags for preadv2/pwritev2: