Re: [PATCH v3 5/5] docs: add fileattr API documentation

From: Andrey Albershteyn

Date: Mon Nov 30 2026 - 08:33:30 EST


On 2026-11-29 03:42:33, koraynilay wrote:
> Add documentation for the fileattr API.
>
> Signed-off-by: koraynilay <koray.fra@xxxxxxxxx>
> ---
> Documentation/filesystems/fileattr.rst | 530 +++++++++++++++++++++++++
> Documentation/filesystems/index.rst | 1 +
> Documentation/filesystems/vfs.rst | 19 +-
> include/uapi/linux/fs.h | 28 +-
> 4 files changed, 568 insertions(+), 10 deletions(-)
> create mode 100644 Documentation/filesystems/fileattr.rst
>
> diff --git a/Documentation/filesystems/fileattr.rst b/Documentation/filesystems/fileattr.rst
> new file mode 100644
> index 000000000000..9e3515dc4517
> --- /dev/null
> +++ b/Documentation/filesystems/fileattr.rst
> @@ -0,0 +1,530 @@
> +.. SPDX-License-Identifier: GPL-2.0
> +
> +============
> +Fileattr API
> +============
> +
> +Overview
> +========
> +
> +The fileattr API provides a modern way (instead of the older
> +``FS_IOC_[GS]ETFLAGS`` and ``FS_IOC_FS[GS]ETXATTR`` ioctls) to query and modify inode
> +flags (like immutable and append-only).

Note, there're man-pages for file_getattr()/file_setattr() merged
for a next release [1] and [2]. The `struct file_attr` man page is
already merged in 6.20 [3].

I think it worth referencing these and maybe focus this doc more on
internals?

1: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=f73700438c6cdbe80a28619dbc3f41708e339247
2: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=e5a0a8c70331002298f070920e18ee0ffbcdad32
3: https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git/commit/?id=8afa46e2ada9331c44d91026f1214b8ad4c1cfaf

--
- Andrey