aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorJosef Bacik <josef@toxicpanda.com>2024-06-24 11:49:50 -0400
committerChristian Brauner <brauner@kernel.org>2024-06-28 09:53:31 +0200
commite8e43a1fcc5c07575f37e40f8a2cd78aee46f9a0 (patch)
tree58c23b611a71a68ce96cd91acd984c910960e460 /include/uapi
parentfs: Allow statmount() in foreign mount namespace (diff)
downloadlinux-e8e43a1fcc5c07575f37e40f8a2cd78aee46f9a0.tar.gz
linux-e8e43a1fcc5c07575f37e40f8a2cd78aee46f9a0.zip
fs: add an ioctl to get the mnt ns id from nsfs
In order to utilize the listmount() and statmount() extensions that allow us to call them on different namespaces we need a way to get the mnt namespace id from user space. Add an ioctl to nsfs that will allow us to extract the mnt namespace id in order to make these new extensions usable. Signed-off-by: Josef Bacik <josef@toxicpanda.com> Link: https://lore.kernel.org/r/180449959d5a756af7306d6bda55f41b9d53e3cb.1719243756.git.josef@toxicpanda.com Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/nsfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/uapi/linux/nsfs.h b/include/uapi/linux/nsfs.h
index a0c8552b64ee..56e8b1639b98 100644
--- a/include/uapi/linux/nsfs.h
+++ b/include/uapi/linux/nsfs.h
@@ -15,5 +15,7 @@
#define NS_GET_NSTYPE _IO(NSIO, 0x3)
/* Get owner UID (in the caller's user namespace) for a user namespace */
#define NS_GET_OWNER_UID _IO(NSIO, 0x4)
+/* Get the id for a mount namespace */
+#define NS_GET_MNTNS_ID _IO(NSIO, 0x5)
#endif /* __LINUX_NSFS_H */