History

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.

Josef Bacik committed 2 years ago

Commit e8e43a11 parent 71aacb42 files · +16 −0Browse files

Showing the changes to include/uapi (1 of 2 files). Show all

Unified · Split

include/uapi/linux/nsfs.h+2−0
@@ -15,5 +15,7 @@ · 14 unmodified lines
1515 #define NS_GET_NSTYPE _IO(NSIO, 0x3)
1616 /* Get owner UID (in the caller's user namespace) for a user namespace */
1717 #define NS_GET_OWNER_UID _IO(NSIO, 0x4)
18+/* Get the id for a mount namespace */
19+#define NS_GET_MNTNS_ID _IO(NSIO, 0x5)
1820
1921 #endif /* __LINUX_NSFS_H */