]> git.ipfire.org Git - thirdparty/linux.git/commit
ksmbd: Report filesystem case sensitivity via FS_ATTRIBUTE_INFORMATION
authorChuck Lever <chuck.lever@oracle.com>
Thu, 7 May 2026 08:53:08 +0000 (04:53 -0400)
committerChristian Brauner <brauner@kernel.org>
Mon, 11 May 2026 14:50:30 +0000 (16:50 +0200)
commit0164df1d1de7602f27d359031a780e9caae80d3d
tree35f753e77ee9998ad62fdcc30f9d169ab21dbf7e
parent01ee7c3d2e23b41cc3f285e69b474f4e0890cce9
ksmbd: Report filesystem case sensitivity via FS_ATTRIBUTE_INFORMATION

FS_ATTRIBUTE_INFORMATION responses have always reported
FILE_CASE_SENSITIVE_SEARCH and FILE_CASE_PRESERVED_NAMES
unconditionally. Case-insensitive filesystems like exFAT, and
casefolded directories on ext4 or f2fs, have no way to signal
their actual semantics to SMB clients.

Now that filesystems expose case behavior through ->fileattr_get,
query it via vfs_fileattr_get() and translate the FS_XFLAG_CASEFOLD
and FS_XFLAG_CASENONPRESERVING flags into the corresponding SMB
attributes. Filesystems without ->fileattr_get continue reporting
default POSIX behavior (case-sensitive, case-preserving).

SMB's FS_ATTRIBUTE_INFORMATION reports per-share attributes from
the share root, not per-file. Shares mixing casefold and
non-casefold directories report the root directory's behavior.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Roland Mainz <roland.mainz@nrubsig.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Link: https://patch.msgid.link/20260507-case-sensitivity-v14-15-e62cc8200435@oracle.com
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/smb/server/smb2pdu.c