On Thu, Jan 22, 2026 at 11:03:02AM -0500, Chuck Lever wrote: > From: Chuck Lever <[email protected]> > > Report ext4's case sensitivity behavior via the FS_XFLAG_CASEFOLD > flag. ext4 always preserves case at rest. > > Case sensitivity is a per-directory setting in ext4. If the queried > inode is a casefolded directory, report case-insensitive; otherwise > report case-sensitive (standard POSIX behavior). > > Reviewed-by: Jan Kara <[email protected]> > Signed-off-by: Chuck Lever <[email protected]> > --- > fs/ext4/ioctl.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c > index 7ce0fc40aec2..462da7aadc80 100644 > --- a/fs/ext4/ioctl.c > +++ b/fs/ext4/ioctl.c > @@ -996,6 +996,13 @@ int ext4_fileattr_get(struct dentry *dentry, struct > file_kattr *fa) > if (ext4_has_feature_project(inode->i_sb)) > fa->fsx_projid = from_kprojid(&init_user_ns, ei->i_projid); > > + /* > + * Case folding is a directory attribute in ext4. Set FS_XFLAG_CASEFOLD > + * for directories with the casefold attribute; all other inodes use > + * standard case-sensitive semantics. > + */ > + if (IS_CASEFOLDED(inode)) > + fa->fsx_xflags |= FS_XFLAG_CASEFOLD;
Curious. Shouldn't the VFS set FS_XFLAG_CASEFOLD if the VFS casefolding flag is set? OTOH, there are more filesystems that apparently support casefolding (given the size of this patchset) than actually set S_CASEFOLD. I think I'm ignorant of something here... --D > return 0; > } > > -- > 2.52.0 > > _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
