summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorJens Axboe <axboe@kernel.dk>2020-12-17 19:19:10 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-04 13:39:17 +0300
commit5683caa7350f389d099b72bfdb289d2073286e32 (patch)
tree2e8e896da574a2f3c4c3c8a4d02c13bc385b6245 /include/uapi
parent0cf0ce8fb5b10d669072345ea855de112d0e0a43 (diff)
downloadlinux-5683caa7350f389d099b72bfdb289d2073286e32.tar.xz
fs: expose LOOKUP_CACHED through openat2() RESOLVE_CACHED
[ Upstream commit 99668f618062816ca7ba639b007eb145b9d3d41e ] Now that we support non-blocking path resolution internally, expose it via openat2() in the struct open_how ->resolve flags. This allows applications using openat2() to limit path resolution to the extent that it is already cached. If the lookup cannot be satisfied in a non-blocking manner, openat2(2) will return -1/-EAGAIN. Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/openat2.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/uapi/linux/openat2.h b/include/uapi/linux/openat2.h
index 58b1eb711360..a5feb7604948 100644
--- a/include/uapi/linux/openat2.h
+++ b/include/uapi/linux/openat2.h
@@ -35,5 +35,9 @@ struct open_how {
#define RESOLVE_IN_ROOT 0x10 /* Make all jumps to "/" and ".."
be scoped inside the dirfd
(similar to chroot(2)). */
+#define RESOLVE_CACHED 0x20 /* Only complete if resolution can be
+ completed through cached lookup. May
+ return -EAGAIN if that's not
+ possible. */
#endif /* _UAPI_LINUX_OPENAT2_H */