From: Chuck Lever Upper layers such as NFSD need to query whether a filesystem is case-sensitive. Report case sensitivity via the FS_XFLAG_CASEFOLD flag 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. Reviewed-by: "Darrick J. Wong" Signed-off-by: Chuck Lever --- 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 f0417c4d1fca..da98d4422b02 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); + /* + * FS_XFLAG_CASEFOLD indicates case-insensitive lookups with + * case preservation. This matches ASCIICI behavior: lookups + * fold ASCII case while filenames remain stored verbatim. + */ + if (xfs_has_asciici(ip->i_mount)) + fa->fsx_xflags |= FS_XFLAG_CASEFOLD; return 0; } -- 2.52.0