Linux filesystem development
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Christian Brauner <brauner@kernel.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [GIT PULL 05/16 for v7.2] vfs casefold
Date: Fri, 12 Jun 2026 17:12:45 +0200	[thread overview]
Message-ID: <20260612-vfs-casefold-v72-e9b33c432ef3@brauner> (raw)
In-Reply-To: <20260612-vfs-v72-20facee87e19@brauner>

Hey Linus,

/* Summary */

This exposes the case folding behavior of local filesystems so that
file servers - nfsd, ksmbd, and user space file servers - can report
the actual behavior to clients instead of guessing.

Filesystems report case-insensitive and case-nonpreserving behavior
via new file_kattr flags in their fileattr_get implementations. fat,
exfat, ntfs3, hfs, hfsplus, xfs, cifs, nfs, vboxsf, and isofs are
wired up; local filesystems not explicitly handled default to the
usual POSIX behavior of case-sensitive and case-preserving. nfsd uses
this to report case folding via NFSv3 PATHCONF and to implement the
NFSv4 FATTR4_CASE_INSENSITIVE and FATTR4_CASE_PRESERVING attributes -
both have been part of the NFS protocols for decades to support
clients on non-POSIX systems - and ksmbd reports it via
FS_ATTRIBUTE_INFORMATION. Exposing the information through the
fileattr uapi covers user space file servers.

The immediate motivation is interoperability: Windows NFS clients
hard-require servers to report case-insensitivity for Win32
applications to work correctly, and a client that knows the server is
case-insensitive can avoid issuing multiple LOOKUP/READDIR requests
searching for case variants. The Linux NFS client already grew
support for case-insensitive shares years ago in support of the
Hammerspace NFS server - negative dentry caching must be disabled (a
lookup for "FILE.TXT" failing must not cache a negative entry when
"file.txt" exists) and directory change invalidation must drop cached
case-folded name variants. Such servers often operate in
multi-protocol environments where a single file service instance
caters to both NFS and SMB clients, and nfsd needs to report case
folding properly to participate as a first-class citizen there.

A follow-up series brings fixes for the initial work: the nfsd
case-info probe now uses kernel credentials, maps -ESTALE to
NFS3ERR_STALE, and has its cost capped across READDIR entries; the
nfs client avoids transiently zeroed case capability bits during the
probe and skips the pathconf probe when neither field is consumed;
the FS_CASEFOLD_FL semantics are clarified in the UAPI header; and
the tools UAPI headers are synced.

Note that the nfsd tree is based on a merge of this branch so these
changes may also reach you through the nfsd pull request.

/* Testing */

gcc (Debian 14.2.0-19) 14.2.0
Debian clang version 19.1.7 (3+b1)

No build failures or warnings were observed.

/* Conflicts */

Merge conflicts with mainline
=============================

No known conflicts.

Merge conflicts with other trees
================================

This has a merge conflict with the ntfs3 tree in fs/ntfs3/file.c,
fs/ntfs3/namei.c, and fs/ntfs3/ntfs_fs.h between commit eeb7b37b9700f
("ntfs3: Implement fileattr_get for case sensitivity") from this tree
and commit 245bbdd2b9d65 ("fs/ntfs3: add fileattr support") from the
ntfs3 tree. Reported with resolution in [1].

[1]: https://lore.kernel.org/linux-next/ahmF4spkQMYcQMGI@sirena.org.uk

The following changes since commit 254f49634ee16a731174d2ae34bc50bd5f45e731:

  Linux 7.1-rc1 (2026-04-26 14:19:00 -0700)

are available in the Git repository at:

  git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-7.2-rc1.casefold

for you to fetch changes up to ea3120fd5153c967efb20e6e3330caecbf9d8b0a:

  Merge patch series "Casefold Fixes" (2026-05-15 17:49:29 +0200)

----------------------------------------------------------------
vfs-7.2-rc1.casefold

Please consider pulling these changes from the signed vfs-7.2-rc1.casefold tag.

Thanks!
Christian

----------------------------------------------------------------
Christian Brauner (2):
      Merge patch series "Exposing case folding behavior"
      Merge patch series "Casefold Fixes"

Chuck Lever (22):
      fs: Move file_kattr initialization to callers
      fs: Add case sensitivity flags to file_kattr
      fat: Implement fileattr_get for case sensitivity
      exfat: Implement fileattr_get for case sensitivity
      ntfs3: Implement fileattr_get for case sensitivity
      hfs: Implement fileattr_get for case sensitivity
      hfsplus: Report case sensitivity in fileattr_get
      xfs: Report case sensitivity in fileattr_get
      cifs: Implement fileattr_get for case sensitivity
      nfs: Implement fileattr_get for case sensitivity
      vboxsf: Implement fileattr_get for case sensitivity
      isofs: Implement fileattr_get for case sensitivity
      nfsd: Report export case-folding via NFSv3 PATHCONF
      nfsd: Implement NFSv4 FATTR4_CASE_INSENSITIVE and FATTR4_CASE_PRESERVING
      ksmbd: Report filesystem case sensitivity via FS_ATTRIBUTE_INFORMATION
      tools headers UAPI: Sync case-sensitivity flags from linux/fs.h
      nfs: Avoid transient zeroed case capability bits during probe
      nfs: Skip pathconf probe when neither field is consumed
      fs: Clarify FS_CASEFOLD_FL semantics in UAPI header
      nfsd: Use kernel credentials for case-info probe
      nfsd: Map -ESTALE from case probe to NFS3ERR_STALE
      nfsd: Cap case-folding probe cost across READDIR entries

 fs/exfat/exfat_fs.h                             |  2 +
 fs/exfat/file.c                                 | 18 ++++-
 fs/exfat/namei.c                                |  1 +
 fs/fat/fat.h                                    |  3 +
 fs/fat/file.c                                   | 36 +++++++++
 fs/fat/namei_msdos.c                            |  1 +
 fs/fat/namei_vfat.c                             |  1 +
 fs/file_attr.c                                  | 16 ++--
 fs/hfs/dir.c                                    |  1 +
 fs/hfs/hfs_fs.h                                 |  2 +
 fs/hfs/inode.c                                  | 14 ++++
 fs/hfsplus/inode.c                              | 16 +++-
 fs/isofs/dir.c                                  | 16 ++++
 fs/isofs/isofs.h                                |  3 +
 fs/nfs/client.c                                 | 32 +++++---
 fs/nfs/inode.c                                  | 15 ++++
 fs/nfs/internal.h                               |  3 +
 fs/nfs/namespace.c                              |  2 +
 fs/nfs/nfs3proc.c                               |  2 +
 fs/nfs/nfs3xdr.c                                |  7 +-
 fs/nfs/nfs4proc.c                               | 10 ++-
 fs/nfs/proc.c                                   |  3 +
 fs/nfs/symlink.c                                |  3 +
 fs/nfsd/nfs3proc.c                              | 39 ++++++++--
 fs/nfsd/nfs4xdr.c                               | 99 +++++++++++++++++++++++--
 fs/nfsd/vfs.c                                   | 86 +++++++++++++++++++++
 fs/nfsd/vfs.h                                   |  3 +
 fs/nfsd/xdr3.h                                  |  4 +-
 fs/nfsd/xdr4.h                                  | 14 ++++
 fs/ntfs3/file.c                                 | 29 ++++++++
 fs/ntfs3/namei.c                                |  1 +
 fs/ntfs3/ntfs_fs.h                              |  1 +
 fs/smb/client/cifsfs.c                          | 53 +++++++++++++
 fs/smb/client/cifsfs.h                          |  3 +
 fs/smb/client/namespace.c                       |  1 +
 fs/smb/server/smb2pdu.c                         | 30 ++++++--
 fs/vboxsf/dir.c                                 |  1 +
 fs/vboxsf/file.c                                |  6 +-
 fs/vboxsf/super.c                               |  7 ++
 fs/vboxsf/utils.c                               | 30 ++++++++
 fs/vboxsf/vfsmod.h                              |  6 ++
 fs/xfs/libxfs/xfs_inode_util.c                  |  2 +
 fs/xfs/xfs_ioctl.c                              | 22 +++++-
 include/linux/fileattr.h                        |  3 +-
 include/linux/nfs_fs_sb.h                       |  2 +-
 include/linux/nfs_xdr.h                         |  2 +
 include/uapi/linux/fs.h                         | 18 ++++-
 tools/perf/trace/beauty/include/uapi/linux/fs.h |  7 ++
 48 files changed, 618 insertions(+), 58 deletions(-)

  parent reply	other threads:[~2026-06-12 15:12 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 15:10 [GIT PULL 00/16 for v7.2] v7.2 Christian Brauner
2026-06-12 15:11 ` [GIT PULL 01/16 for v7.2] vfs kfunc Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:11 ` [GIT PULL 02/16 for v7.2] vfs exportfs Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:12 ` [GIT PULL 03/16 for v7.2] vfs inode Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:12 ` [GIT PULL 04/16 for v7.2] vfs directory delegations Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:12 ` Christian Brauner [this message]
2026-06-15  3:45   ` [GIT PULL 05/16 for v7.2] vfs casefold pr-tracker-bot
2026-06-12 15:13 ` [GIT PULL 06/16 for v7.2] kernel task_exec_state Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:13 ` [GIT PULL 07/16 for v7.2] kernel misc Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:13 ` [GIT PULL 08/16 for v7.2] vfs openat2 Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:14 ` [GIT PULL 09/16 for v7.2] vfs super Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:14 ` [GIT PULL 10/16 for v7.2] vfs writeback Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:14 ` [GIT PULL 11/16 for v7.2] vfs bh Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:15 ` [GIT PULL 12/16 for v7.2] vfs eventpoll Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:15 ` [GIT PULL 13/16 for v7.2] vfs iomap Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:15 ` [GIT PULL 14/16 for v7.2] vfs xattr Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:16 ` [GIT PULL 15/16 for v7.2] vfs misc Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot
2026-06-12 15:16 ` [GIT PULL 16/16 for v7.2] vfs procfs Christian Brauner
2026-06-15  3:45   ` pr-tracker-bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260612-vfs-casefold-v72-e9b33c432ef3@brauner \
    --to=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox