Thread (22 messages) 22 messages, 3 authors, 2026-01-23

Re: [PATCH v7 01/16] fs: Add case sensitivity flags to file_kattr

From: "Chuck Lever" <cel@kernel.org>
Date: 2026-01-23 00:42:41
Also in: linux-cifs, linux-ext4, linux-f2fs-devel, linux-fsdevel, linux-nfs, linux-xfs


On Thu, Jan 22, 2026, at 7:26 PM, Darrick J. Wong wrote:
On Thu, Jan 22, 2026 at 11:02:56AM -0500, Chuck Lever wrote:
quoted
From: Chuck Lever <chuck.lever@oracle.com>

Enable upper layers such as NFSD to retrieve case sensitivity
information from file systems by adding FS_XFLAG_CASEFOLD and
FS_XFLAG_CASENONPRESERVING flags.

Filesystems report case-insensitive or case-nonpreserving behavior
by setting these flags directly in fa->fsx_xflags. The default
(flags unset) indicates POSIX semantics: case-sensitive and
case-preserving. These flags are read-only; userspace cannot set
them via ioctl.

Remove struct file_kattr initialization from fileattr_fill_xflags()
and fileattr_fill_flags(). Callers at ioctl/syscall entry points
zero-initialize the struct themselves, which allows them to pass
hints (flags_valid, fsx_valid) to the filesystem's ->fileattr_get()
callback via the fa argument. Filesystem handlers that invoke these
fill functions can now set flags directly in fa->fsx_xflags before
calling them, without the fill functions zeroing those values.
In hindsight I regret not asking for the file_kattr initialization
change to be in a separate patch.
If I’m asked to post another revision of this series, I’ll look at splitting
1/16 into two patches.

quoted
Case sensitivity information is exported to userspace via the
fa_xflags field in the FS_IOC_FSGETXATTR ioctl and file_getattr()
system call.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
The UAPI changes still look ok to me.  AFAICT the file_kattr
initialization now seem like they don't zap fields to confuse
vfs_fileattr_get.

Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

-- 
Chuck Lever
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help