Re: [PATCH v2 4/4] ntfs: switch to the new xflags fileattr API
From: Amir Goldstein
Date: Fri Nov 27 2026 - 07:05:03 EST
On Thu, Nov 26, 2026 at 5:31 PM koraynilay <koray.fra@xxxxxxxxx> wrote:
>
> Switch ntfs_fileattr_[gs]et() from the legacy FS_*_FL flags to the
> modern xflags (FS_XFLAG_*) fileattr API with masks.
>
This is where the commit ends doing what its subject is saying.
> Introduce FS_XFLAG_COMPR and FS_XFLAG_ENCRYPT to be used in this API
> upgrade.
>
> Following the FS_XFLAG_VERITY example, put FS_XFLAG_ENCRYPT in
> FS_XFLAG_RDONLY_MASK and in FS_XFLAG_COMMON, since it's read-only for
> all filesystems.
>
> Following the FS_XFLAG_CASEFOLD example, put FS_XFLAG_COMPR in
> FS_XFLAG_RDONLY_MASK but not in FS_XFLAG_COMMON, since it's read-write
> for some filesystems and read-only for others, to avoid breaking
> existing filesystems.
>
> Also update vfs fileattr_fill_* helpers to include these two flags as
> well.
All of those non trivial bits deserve a patch of their own.
Not only are they independent vfs changes, but they also have
implications outside
of ntfs which need to be spelled out.
With current patches, I think this change now advertizes COMPR|ENCRYPT
in fxs_xflags for all filesystems that have them set even with the old VER0 API.
That may be ok, but it needs to be spelled out.
Do we also allow to set COMPR via VER0 API? Do we want to?
These are questions to be asked on a standalone patch.
Thanks,
Amir.