|
NAME | LIBRARY | SYNOPSIS | DESCRIPTION | STANDARDS | HISTORY | SEE ALSO | COLOPHON |
|
|
|
mount_attr(2type) mount_attr(2type)
mount_attr - what mount properties to set and clear
Linux kernel headers
#include <sys/mount.h>
struct mount_attr {
u64 attr_set; /* Mount properties to set */
u64 attr_clr; /* Mount properties to clear */
u64 propagation; /* Mount propagation type */
u64 userns_fd; /* User namespace file descriptor */
/* ... */
};
Specifies which mount properties should be changed with
mount_setattr(2).
The fields are as follows:
.attr_set
This field specifies which MOUNT_ATTR_* attribute flags to
set.
.attr_clr
This field specifies which MOUNT_ATTR_* attribute flags to
clear.
.propagation
This field specifies what mount propagation will be
applied. The valid values of this field are the same
propagation types described in mount_namespaces(7).
.userns_fd
This field specifies a file descriptor that indicates which
user namespace to use as a reference for ID-mapped mounts
with MOUNT_ATTR_IDMAP.
Linux.
Linux 5.12. glibc 2.36.
Extra fields may be appended to the structure, with a zero value
in a new field resulting in the kernel behaving as though that
extension field was not present. Therefore, a user must zero-fill
this structure on initialization.
mount_setattr(2)
This page is part of the man-pages (Linux kernel and C library
user-space interface documentation) project. Information about
the project can be found at
⟨https://www.kernel.org/doc/man-pages/⟩. If you have a bug report
for this manual page, see
⟨https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/tree/CONTRIBUTING⟩.
This page was obtained from the tarball man-pages-6.16.tar.gz
fetched from
⟨https://mirrors.edge.kernel.org/pub/linux/docs/man-pages/⟩ on
2026-01-16. If you discover any rendering problems in this HTML
version of the page, or you believe there is a better or more up-
to-date source for the page, or you have corrections or
improvements to the information in this COLOPHON (which is not
part of the original manual page), send a mail to
man-pages@man7.org
Linux man-pages 6.16 2025-09-21 mount_attr(2type)
Pages that refer to this page: fsmount(2), mount_setattr(2), open_tree(2)