On Mon, Jan 12, 2026 at 12:46:21PM -0500, Chuck Lever wrote: > From: Chuck Lever <[email protected]> > > Upper layers such as NFSD need to query whether a filesystem is > case-sensitive. Populate the case_insensitive and case_preserving > fields in xfs_fileattr_get(). XFS always preserves case. XFS is > case-sensitive by default, but supports ASCII case-insensitive > lookups when formatted with the ASCIICI feature flag. > > Signed-off-by: Chuck Lever <[email protected]>
Well as a pure binary statement of xfs' capabilities, this is correct so: Reviewed-by: "Darrick J. Wong" <[email protected]> [add ngompa] But the next obvious question I would have as a userspace programmer is "case insensitive how, exactly?", which was the topic of the previous revision. Somewhere out there there's a program / emulation layer that will want to know the exact transformation when doing a non-memcmp lookup. Probably Winderz casefolding has behaved differently every release since the start of NTFS, etc. I don't know how to solve that, other than the fs compiles its case-flattening code into a bpf program and exports that where someone can read() it and run/analyze/reverse engineer it. But ugh, Linus is right that this area is a mess. :/ --D > --- > fs/xfs/xfs_ioctl.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c > index 59eaad774371..97314fcb7732 100644 > --- a/fs/xfs/xfs_ioctl.c > +++ b/fs/xfs/xfs_ioctl.c > @@ -516,6 +516,13 @@ xfs_fileattr_get( > xfs_fill_fsxattr(ip, XFS_DATA_FORK, fa); > xfs_iunlock(ip, XFS_ILOCK_SHARED); > > + /* > + * XFS is case-sensitive by default, but can be formatted with > + * ASCII case-insensitive mode enabled. > + */ > + fa->case_insensitive = xfs_has_asciici(ip->i_mount); > + fa->case_preserving = true; > + > return 0; > } > > -- > 2.52.0 > > _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
