[PATCH v2 07/13] Add OPEN_TREE_NAMESPACE and FSMOUNT_NAMESPACE to sys/mount.h
Florian Weimer
fweimer@redhat.com
Fri Jul 3 17:44:49 GMT 2026
* Adhemerval Zanella:
> Add OPEN_TREE_NAMESPACE (commit 9b8a0ba68246a61d903ce62c35c303b1501df28b,
> Linux 7.0) and FSMOUNT_NAMESPACE (commit
> 5e8969bd192712419aae511dd5ba26855c2c78db, Linux 7.1).
> ---
> sysdeps/unix/sysv/linux/sys/mount.h | 6 ++++++
> sysdeps/unix/sysv/linux/tst-mount-consts.py | 4 ++--
> 2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
> index 0c5ebed33ae..632c3a59d84 100644
> --- a/sysdeps/unix/sysv/linux/sys/mount.h
> +++ b/sysdeps/unix/sysv/linux/sys/mount.h
> @@ -189,6 +189,8 @@ enum
>
> /* fsmount flags. */
> #define FSMOUNT_CLOEXEC 0x00000001
> +#define FSMOUNT_NAMESPACE 0x00000002 /* Create the mount in a new mount
> + namespace. */
>
> /* mount attributes used on fsmount. */
> #define MOUNT_ATTR_RDONLY 0x00000001 /* Mount read-only. */
> @@ -267,6 +269,10 @@ enum fsconfig_command
> #ifndef OPEN_TREE_CLONE
> # define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
> #endif
> +#ifndef OPEN_TREE_NAMESPACE
> +# define OPEN_TREE_NAMESPACE 2 /* Clone the target tree into a new mount
> + namespace */
> +#endif
I would use
#define OPEN_TREE_NAMESPACE (1 << 1)
without the #ifdef. We added the #ifdef only because the referenced
commit changed the token sequence for OPEN_TREE_CLONE.
Thanks,
Florian
More information about the Libc-alpha
mailing list