On Mon Nov 23, 2026 at 2:35 PM CET, Amir Goldstein wrote: > On Sun, Nov 22, 2026 at 1:09 AM koraynilay wrote: >> >> This is a follow up patch series stemmed from [1] and [2], splitting the >> _mask change for the fileattr API into its own separate patch. >> >> The first patch is a preparatory patch so that the code in the patch >> after can be formatted better. >> >> The second patch is the actual implementation, which introduces: >> - fa_xflags_{rw,ro}_mask fields to struct file_attr >> - fsx_xflags_{rw,ro}_mask fields and has_masks selector to struct file_kattr >> >> These masks have the following semantics: >> - rw_mask: >> * for filesystems: advertise which xflags they support changing >> * for userspace: specify which xflags it wants to modify >> - ro_mask: >> * for filesystems: advertise which xflags they support only reading >> * for userspace: ignored > > Nice! > I think this API description is very clear and coherent By the way, should I use this description in the commit message (and integrate it with missing information before/after the bullet points), or should I keep the current one? (current one:) > This lets filesystems advertise their support for specific xflags, like > statx.stx_attributes_mask does, and userspace can specify only which > xflags it wants to change without needing a RMW cycle: > - on GET: each filesystem that wants to support this new API fills the > masks according to its supported and read-only xflags, then: > * for boolean xflags: it fills fsx_xflags with the current on-disk value > * for value xflags: it sets the xflag bit to 1 in fsx_xflags and the > xflag value in the struct field; > - on SET: userspace fills the rw_mask with the bits of the xflags it > wants to change, then: > * for boolean xflags: it provides the xflag value as a bit in fa_xflags > * for value xflags: it sets the xflag bit to 1 in fa_xflags and then > provides the value in the struct field; if the xflag bit is set to 0 > instead, this informs the kernel to unset/clear that value. Thanks, koraynilay