pathconf: Define a new name called _PC_CASE_INSENSITIVE

Some FreeBSD file systems (msdosfs and optionally ZFS)
handle case insensitive file name lookup.
NFS (v3 and 4) provide an attribute to indicate this
capability, but without this patch, the NFS server does
not know if the file system does support this.

This patch adds the pathconf name_PC_CASE_INSENSITIVE
that can be used by the NFS server or user programs to
check for this feature.

Reviewed by:	kib
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D53349
This commit is contained in:
Rick Macklem 2025-10-25 13:37:35 -07:00
parent e6e941e659
commit d6864221d8
3 changed files with 5 additions and 0 deletions

View file

@ -1944,6 +1944,9 @@ msdosfs_pathconf(struct vop_pathconf_args *ap)
case _PC_HAS_HIDDENSYSTEM:
*ap->a_retval = 1;
return (0);
case _PC_CASE_INSENSITIVE:
*ap->a_retval = 1;
return (0);
default:
return (vop_stdpathconf(ap));
}

View file

@ -458,6 +458,7 @@ vop_stdpathconf(struct vop_pathconf_args *ap)
case _PC_HAS_NAMEDATTR:
case _PC_HAS_HIDDENSYSTEM:
case _PC_CLONE_BLKSIZE:
case _PC_CASE_INSENSITIVE:
*ap->a_retval = 0;
return (0);
default:

View file

@ -160,6 +160,7 @@
#define _PC_XATTR_EXISTS _PC_HAS_NAMEDATTR /* Solaris Compatible */
#define _PC_HAS_HIDDENSYSTEM 68
#define _PC_CLONE_BLKSIZE 69
#define _PC_CASE_INSENSITIVE 70
#endif
/* From OpenSolaris, used by SEEK_DATA/SEEK_HOLE. */