Manual of file_attr(2type)

file_attr(2type) file_attr(2type)

file_attr - filesystem file attributes

#include <linux/fs.h>
struct file_attr {
	u64  fa_xflags;      // Extended flags
	u32  fa_extsize;     // Extent size hint
	u32  fa_nextents;    // Number of extents (read-only)
	u32  fa_projid;      // Project identifier
	u32  fa_cowextsize;  // CoW extent size hint
};

Describes filesystem file attributes for use with the file_getattr(2) and file_setattr(2) system calls.

The fields are as follows:

.fa_xflags
This field contains file attribute flags. It is a bit mask consisting of zero or more of the FS_XFLAG_* flags. See Flags below for a list of flags.
.fa_extsize
Extent size allocator hint in bytes. This value suggests a preferred extent size for new allocations to this file.
.fa_nextents
Number of data extents in the file (read-only). This field is filled in by file_getattr(2) and is ignored by file_setattr(2).
.fa_projid
Project identifier. Used by quota systems quotactl(2) to group related files.
.fa_cowextsize
Copy-on-Write (CoW) extent size hint in bytes. This value suggests a preferred extent size for CoW operations.

Data is stored in a realtime volume.
File cannot be modified.
All writes must append to the end of the file.
All writes are synchronous.
Do not update file access time on reads.
Do not include file in backups.
Use Direct Access (DAX) for I/O operations.
Exclude this file from defragmentation operations.
Use filestream allocator for this file.
Use the extent size hint from the fa_extsize field.
Use the CoW extent size hint from the fa_cowextsize field.

Directory-only flags:

New files created in this directory inherit the realtime flag.
Disallow creation of symbolic links in this directory.
New files created in this directory inherit the extent size hint.
New files created in this directory inherit the project identifier.

Read-only flags:

File has preallocated extents.
File has extended attributes.
File has fs-verity enabled.
The filesystem performs case-insensitive lookups (file and directory name comparisons ignore case).
The filesystem does not preserve the case of file and directory names.

Not all filesystems support all flags. Setting unsupported flags may result in an error.

This structure is introduced.

The FS_XFLAG_CASEFOLD and FS_XFLAG_CASENONPRESERVING are introduced to enable upper layers, such as NFSD, to retrieve case sensitivity information.

file_getattr(2), file_setattr(2)

2026-10-11 Linux man-pages (unreleased)

Different Versions of this Page: