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 12/17 for v6.19] vfs directory delegations
Date: Fri, 28 Nov 2025 17:48:23 +0100 [thread overview]
Message-ID: <20251128-vfs-directory-delegations-v619-07cf59ad4cf2@brauner> (raw)
In-Reply-To: <20251128-vfs-v619-77cd88166806@brauner>
Hey Linus,
/* Summary */
This contains the work for cecall-only directory delegations for knfsd.
Add support for simple, recallable-only directory delegations. This was
decided at the fall NFS Bakeathon where the NFS client and server
maintainers discussed how to merge directory delegation support.
The approach starts with recallable-only delegations for several reasons:
1. RFC8881 has gaps that are being addressed in RFC8881bis. In particular,
it requires directory position information for CB_NOTIFY callbacks,
which is difficult to implement properly under Linux. The spec is being
extended to allow that information to be omitted.
2. Client-side support for CB_NOTIFY still lags. The client side involves
heuristics about when to request a delegation.
3. Early indication shows simple, recallable-only delegations can help
performance. Anna Schumaker mentioned seeing a multi-minute speedup in
xfstests runs with them enabled.
With these changes, userspace can also request a read lease on a
directory that will be recalled on conflicting accesses. This may be
useful for applications like Samba. Users can disable leases altogether
via the fs.leases-enable sysctl if needed.
VFS Changes
- Dedicated Type for Delegations
Introduce struct delegated_inode to track inodes that may have delegations
that need to be broken. This replaces the previous approach of passing
raw inode pointers through the delegation breaking code paths, providing
better type safety and clearer semantics for the delegation machinery.
- Break parent directory delegations in open(..., O_CREAT) codepath
- Allow mkdir to wait for delegation break on parent
- Allow rmdir to wait for delegation break on parent
- Add try_break_deleg calls for parents to vfs_link(), vfs_rename(),
and vfs_unlink()
- Make vfs_create(), vfs_mknod(), and vfs_symlink() break delegations
on parent directory
- Clean up argument list for vfs_create()
- Expose delegation support to userland
Filelock Changes
- Make lease_alloc() take a flags argument
- Rework the __break_lease API to use flags
- Add struct delegated_inode
- Push the S_ISREG check down to ->setlease handlers
- Lift the ban on directory leases in generic_setlease
NFSD Changes
- Allow filecache to hold S_IFDIR files
- Allow DELEGRETURN on directories
- Wire up GET_DIR_DELEGATION handling
Fixes
- Fix kernel-doc warnings in __fcntl_getlease
- Add needed headers for new struct delegation definition
/* 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
================================
[1] https://lore.kernel.org/linux-next/20251117073452.2c9b0190@canb.auug.org.au
The following changes since commit 3a8660878839faadb4f1a6dd72c3179c1df56787:
Linux 6.18-rc1 (2025-10-12 13:42:36 -0700)
are available in the Git repository at:
git@gitolite.kernel.org:pub/scm/linux/kernel/git/vfs/vfs tags/vfs-6.19-rc1.directory.delegations
for you to fetch changes up to 4be9e04ebf75a5c4478c1c6295e2122e5dc98f5f:
vfs: add needed headers for new struct delegation definition (2025-11-28 10:55:34 +0100)
Please consider pulling these changes from the signed vfs-6.19-rc1.directory.delegations tag.
Thanks!
Christian
----------------------------------------------------------------
vfs-6.19-rc1.directory.delegations
----------------------------------------------------------------
Christian Brauner (1):
Merge patch series "vfs: recall-only directory delegations for knfsd"
Jeff Layton (18):
filelock: make lease_alloc() take a flags argument
filelock: rework the __break_lease API to use flags
filelock: add struct delegated_inode
filelock: push the S_ISREG check down to ->setlease handlers
vfs: add try_break_deleg calls for parents to vfs_{link,rename,unlink}
vfs: allow mkdir to wait for delegation break on parent
vfs: allow rmdir to wait for delegation break on parent
vfs: break parent dir delegations in open(..., O_CREAT) codepath
vfs: clean up argument list for vfs_create()
vfs: make vfs_create break delegations on parent directory
vfs: make vfs_mknod break delegations on parent directory
vfs: make vfs_symlink break delegations on parent dir
filelock: lift the ban on directory leases in generic_setlease
nfsd: allow filecache to hold S_IFDIR files
nfsd: allow DELEGRETURN on directories
nfsd: wire up GET_DIR_DELEGATION handling
vfs: expose delegation support to userland
vfs: add needed headers for new struct delegation definition
Randy Dunlap (1):
filelock: __fcntl_getlease: fix kernel-doc warnings
drivers/base/devtmpfs.c | 6 +-
fs/attr.c | 2 +-
fs/cachefiles/namei.c | 2 +-
fs/ecryptfs/inode.c | 11 ++-
fs/fcntl.c | 13 ++++
fs/fuse/dir.c | 1 +
fs/init.c | 6 +-
fs/locks.c | 103 ++++++++++++++++++++--------
fs/namei.c | 162 +++++++++++++++++++++++++++++++++------------
fs/nfs/nfs4file.c | 2 +
fs/nfsd/filecache.c | 57 ++++++++++++----
fs/nfsd/filecache.h | 2 +
fs/nfsd/nfs3proc.c | 2 +-
fs/nfsd/nfs4proc.c | 22 +++++-
fs/nfsd/nfs4recover.c | 6 +-
fs/nfsd/nfs4state.c | 103 +++++++++++++++++++++++++++-
fs/nfsd/state.h | 5 ++
fs/nfsd/vfs.c | 16 ++---
fs/nfsd/vfs.h | 2 +-
fs/open.c | 12 ++--
fs/overlayfs/overlayfs.h | 10 +--
fs/posix_acl.c | 8 +--
fs/smb/client/cifsfs.c | 3 +
fs/smb/server/vfs.c | 9 ++-
fs/utimes.c | 4 +-
fs/xattr.c | 12 ++--
fs/xfs/scrub/orphanage.c | 2 +-
include/linux/filelock.h | 98 +++++++++++++++++++++------
include/linux/fs.h | 24 ++++---
include/linux/xattr.h | 4 +-
include/uapi/linux/fcntl.h | 16 +++++
net/unix/af_unix.c | 2 +-
32 files changed, 550 insertions(+), 177 deletions(-)
next prev parent reply other threads:[~2025-11-28 16:51 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-28 16:48 [GIT PULL 00/17 for v6.19] v6.19 Christian Brauner
2025-11-28 16:48 ` [GIT PULL 01/17 for v6.19] vfs iomap Christian Brauner
2025-12-01 22:08 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 02/17 for v6.19] vfs misc Christian Brauner
2025-12-01 22:08 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 03/17 for v6.19] vfs inode Christian Brauner
2025-12-01 22:08 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 04/17 for v6.19] vfs writeback Christian Brauner
2025-12-01 22:08 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 05/17 for v6.19] namespaces Christian Brauner
2025-12-01 19:06 ` Eric W. Biederman
2025-12-02 17:00 ` Linus Torvalds
2025-12-03 10:07 ` Christian Brauner
2025-12-01 22:08 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 06/17 for v6.19] vfs coredump Christian Brauner
2025-12-01 22:08 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 07/17 for v6.19] vfs folio Christian Brauner
2025-12-01 22:08 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 08/17 for v6.19] cred guards Christian Brauner
2025-12-01 21:53 ` Linus Torvalds
2025-12-02 1:26 ` Sasha Levin
2025-12-02 1:36 ` [PATCH] nfs/localio: make do_nfs_local_call_write() return void Sasha Levin
2025-12-01 22:08 ` [GIT PULL 08/17 for v6.19] cred guards pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 09/17 for v6.19] vfs headers Christian Brauner
2025-12-01 23:22 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 10/17 for v6.19] vfs super guards Christian Brauner
2025-12-01 23:22 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 11/17 for v6.19] minix Christian Brauner
2025-12-01 23:22 ` pr-tracker-bot
2025-11-28 16:48 ` Christian Brauner [this message]
2025-12-02 3:19 ` [GIT PULL 12/17 for v6.19] vfs directory delegations pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 13/17 for v6.19] vfs directory locking Christian Brauner
2025-12-02 3:19 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 14/17 for v6.19] overlayfs cred guards Christian Brauner
2025-12-02 3:19 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 15/17 for v6.19] autofs Christian Brauner
2025-12-02 3:19 ` pr-tracker-bot
2025-11-28 16:48 ` [GIT PULL 16/17 for v6.19] vfs fd prepare Christian Brauner
2025-12-01 14:15 ` Al Viro
2025-12-01 18:41 ` Sean Christopherson
2025-11-28 16:48 ` [GIT PULL 17/17 for v6.19] vfs fd prepare minimal Christian Brauner
2025-12-02 1:35 ` Linus Torvalds
2025-12-02 9:42 ` Christian Brauner
2025-12-02 3:19 ` 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=20251128-vfs-directory-delegations-v619-07cf59ad4cf2@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;
as well as URLs for NNTP newsgroup(s).