hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/include/uapi/linux/fcntl.h
....@@ -3,6 +3,7 @@
33 #define _UAPI_LINUX_FCNTL_H
44
55 #include <asm/fcntl.h>
6
+#include <linux/openat2.h>
67
78 #define F_SETLEASE (F_LINUX_SPECIFIC_BASE + 0)
89 #define F_GETLEASE (F_LINUX_SPECIFIC_BASE + 1)
....@@ -58,12 +59,19 @@
5859 * Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
5960 * used to clear any hints previously set.
6061 */
61
-#define RWF_WRITE_LIFE_NOT_SET 0
62
+#define RWH_WRITE_LIFE_NOT_SET 0
6263 #define RWH_WRITE_LIFE_NONE 1
6364 #define RWH_WRITE_LIFE_SHORT 2
6465 #define RWH_WRITE_LIFE_MEDIUM 3
6566 #define RWH_WRITE_LIFE_LONG 4
6667 #define RWH_WRITE_LIFE_EXTREME 5
68
+
69
+/*
70
+ * The originally introduced spelling is remained from the first
71
+ * versions of the patch set that introduced the feature, see commit
72
+ * v4.13-rc1~212^2~51.
73
+ */
74
+#define RWF_WRITE_LIFE_NOT_SET RWH_WRITE_LIFE_NOT_SET
6775
6876 /*
6977 * Types of directory notifications that may be requested.
....@@ -76,10 +84,20 @@
7684 #define DN_ATTRIB 0x00000020 /* File changed attibutes */
7785 #define DN_MULTISHOT 0x80000000 /* Don't remove notifier */
7886
87
+/*
88
+ * The constants AT_REMOVEDIR and AT_EACCESS have the same value. AT_EACCESS is
89
+ * meaningful only to faccessat, while AT_REMOVEDIR is meaningful only to
90
+ * unlinkat. The two functions do completely different things and therefore,
91
+ * the flags can be allowed to overlap. For example, passing AT_REMOVEDIR to
92
+ * faccessat would be undefined behavior and thus treating it equivalent to
93
+ * AT_EACCESS is valid undefined behavior.
94
+ */
7995 #define AT_FDCWD -100 /* Special value used to indicate
8096 openat should use the current
8197 working directory. */
8298 #define AT_SYMLINK_NOFOLLOW 0x100 /* Do not follow symbolic links. */
99
+#define AT_EACCESS 0x200 /* Test access permitted for
100
+ effective IDs, not real IDs. */
83101 #define AT_REMOVEDIR 0x200 /* Remove directory instead of
84102 unlinking file. */
85103 #define AT_SYMLINK_FOLLOW 0x400 /* Follow symbolic links. */
....@@ -91,5 +109,6 @@
91109 #define AT_STATX_FORCE_SYNC 0x2000 /* - Force the attributes to be sync'd with the server */
92110 #define AT_STATX_DONT_SYNC 0x4000 /* - Don't sync attributes with the server */
93111
112
+#define AT_RECURSIVE 0x8000 /* Apply to the entire subtree */
94113
95114 #endif /* _UAPI_LINUX_FCNTL_H */