Re: [PATCH v11 12/15] isofs: Implement fileattr_get for case sensitivity
From: Lionel Cons <hidden>
Date: 2026-04-27 12:02:23
Also in:
linux-cifs, linux-ext4, linux-f2fs-devel, linux-fsdevel, linux-nfs, linux-xfs
On Mon, 27 Apr 2026 at 12:47, Jan Kara [off-list ref] wrote:
On Fri 24-04-26 21:53:14, Chuck Lever wrote:quoted
From: Chuck Lever <chuck.lever@oracle.com> Upper layers such as NFSD need a way to query whether a filesystem handles filenames in a case-sensitive manner so they can provide correct semantics to remote clients. Without this information, NFS exports of ISO 9660 filesystems cannot advertise their filename case behavior. Implement isofs_fileattr_get() to report ISO 9660 case handling behavior via the FS_XFLAG_CASEFOLD flag. The 'check=r' (relaxed) mount option enables case-insensitive lookups, and this setting determines the value reported. By default, Joliet extensions operate in relaxed mode while plain ISO 9660 uses strict (case-sensitive) mode. All ISO 9660 variants are case-preserving, meaning filenames are stored exactly as they appear on the disc. Case handling is a superblock-wide property, so the callback must report the same value for every inode type. Regular files previously had no inode_operations; introduce isofs_file_inode_operations to carry the callback. Symlinks previously shared page_symlink_inode_operations; introduce isofs_symlink_inode_operations, which wires page_get_link alongside the callback, so that fileattr queries on a symlink reach the isofs implementation instead of returning -ENOIOCTLCMD. The flag is set in both fa->fsx_xflags and fa->flags so FS_IOC_FSGETXATTR and FS_IOC_GETFLAGS agree. Reviewed-by: Jan Kara <jack@suse.cz> Reviewed-by: Roland Mainz <redacted> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>...quoted
@@ -281,6 +293,18 @@ const struct file_operations isofs_dir_operations = const struct inode_operations isofs_dir_inode_operations = { .lookup = isofs_lookup, + .fileattr_get = isofs_fileattr_get, +}; + +const struct inode_operations isofs_file_inode_operations = +{ + .fileattr_get = isofs_fileattr_get, +}; + +const struct inode_operations isofs_symlink_inode_operations = +{ + .get_link = page_get_link, + .fileattr_get = isofs_fileattr_get, };Hum, I thought casefolding is a directory attribute. At least I don't see a big point in reporting it for regular files or symlinks (and then why not report it for device nodes or named pipes?). So why did you decide for this change?
Where do you see this being a per-directory attribute in https://web.archive.org/web/20170404043745/http://www.ymi.com/ymi/sites/default/files/pdf/Rockridge.pdf Lionel