---
name: "mount_attr"
section: "2type"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/mount_attr"
---

# mount\_attr(2type)

what mount properties to set and clear

## NAME

mount\_attr - what mount properties to set and clear

## LIBRARY

Linux kernel headers

## SYNOPSIS

```
#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 \*/\
     /\* ... \*/ **};**

## DESCRIPTION

Specifies which mount properties should be changed with [**mount\_setattr**(2)](/mount_setattr/2.md).

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)](/mount_namespaces/7.md).

- *.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**.

## STANDARDS

Linux.

## HISTORY

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.

## SEE ALSO

[**mount\_setattr**(2)](/mount_setattr/2.md)
