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

From: koraynilay

Date: Mon Nov 30 2026 - 09:10:49 EST


On Mon Nov 30, 2026 at 2:33 PM CET, Andrey Albershteyn wrote:
> 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].

Ah yes thanks, I was indeed modifying those files to add the masks.
(But I'll probably finish those after having the actual code and doc
finished)

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

Yes, I'll update the doc to reference these.
Should I keep the doc with only stuff that isn't/won't be in the
manpages or have *some* things duplicated?

Thanks,
koraynilay

> 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

Attachment: signature.asc
Description: PGP signature