* [GIT PULL] Please pull NFS client updates for Linux 6.19
@ 2025-12-11 14:07 Trond Myklebust
2025-12-12 10:09 ` pr-tracker-bot
2025-12-17 9:32 ` NFS dentry caching regression? was " Christoph Hellwig
0 siblings, 2 replies; 7+ messages in thread
From: Trond Myklebust @ 2025-12-11 14:07 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-nfs, linux-kernel
Hi Linus,
The following changes since commit 6a23ae0a96a600d1d12557add110e0bb6e32730c:
Linux 6.18-rc6 (2025-11-16 14:25:38 -0800)
are available in the Git repository at:
git://git.linux-nfs.org/projects/trondmy/linux-nfs.git tags/nfs-for-6.19-1
for you to fetch changes up to bd3b04b46c7a9940989ff4b29376e899e93d3a4a:
NFSv4: Handle NFS4ERR_NOTSUPP errors for directory delegations (2025-12-05 19:34:29 -0500)
Cheers
Trond
----------------------------------------------------------------
NFS client updates for Linux 6.19
Highlights include:
Bugfixes:
- Fix 'nlink' attribute update races when unlinking a file.
- Add missing initialisers for the directory verifier in various places.
- Don't regress the NFSv4 open state due to misordered racing replies.
- Ensure the NFSv4.x callback server uses the correct transport
connection.
- Fix potential use-after-free races when shutting down the NFSv4.x
callback server.
- Fix a pNFS layout commit crash.
- Assorted fixes to ensure correct propagation of mount options when the
client crosses a filesystem boundary and triggers the VFS automount
code.
- More localio fixes.
Features and cleanups:
- Add initial support for basic directory delegations.
- SunRPC back channel code cleanups.
----------------------------------------------------------------
Anna Schumaker (5):
NFS: Add support for sending GDD_GETATTR
NFS: Request a directory delegation on ACCESS, CREATE, and UNLINK
NFS: Request a directory delegation during RENAME
NFS: Shortcut lookup revalidations if we have a directory delegation
NFS: Add a module option to disable directory delegations
Jonathan Curley (1):
NFSv4/pNFS: Clear NFS_INO_LAYOUTCOMMIT in pnfs_mark_layout_stateid_invalid
Mike Snitzer (2):
nfs/localio: remove alignment size checking in nfs_is_local_dio_possible
nfs/localio: remove 61 byte hole from needless ____cacheline_aligned
Olga Kornievskaia (4):
NFSv4.1: pass transport for callback shutdown
SUNRPC: cleanup common code in backchannel request
SUNRPC: new helper function for stopping backchannel server
NFSv4.1: protect destroying and nullifying bc_serv structure
Scott Mayhew (1):
NFSv4: ensure the open stateid seqid doesn't go backwards
Trond Myklebust (11):
NFS: Avoid changing nlink when file removes and attribute updates race
NFS: Initialise verifiers for visible dentries in readdir and lookup
NFS: Initialise verifiers for visible dentries in nfs_atomic_open()
NFS: Initialise verifiers for visible dentries in _nfs4_open_and_get_state
Revert "nfs: ignore SB_RDONLY when remounting nfs"
Revert "nfs: clear SB_RDONLY before getting superblock"
Revert "nfs: ignore SB_RDONLY when mounting nfs"
NFS: Automounted filesystems should inherit ro,noexec,nodev,sync flags
NFS: Fix inheritance of the block sizes when automounting
NFS: Fix up the automount fs_context to use the correct cred
NFSv4: Handle NFS4ERR_NOTSUPP errors for directory delegations
fs/nfs/callback.c | 4 +-
fs/nfs/callback.h | 3 +-
fs/nfs/client.c | 21 ++++++--
fs/nfs/delegation.c | 8 +++
fs/nfs/delegation.h | 13 +++++
fs/nfs/dir.c | 46 ++++++++++++----
fs/nfs/inode.c | 3 ++
fs/nfs/internal.h | 3 +-
fs/nfs/localio.c | 4 +-
fs/nfs/namespace.c | 16 +++++-
fs/nfs/nfs3proc.c | 3 +-
fs/nfs/nfs4client.c | 27 +++++++---
fs/nfs/nfs4proc.c | 111 +++++++++++++++++++++++++++++++-------
fs/nfs/nfs4trace.h | 1 +
fs/nfs/nfs4xdr.c | 106 ++++++++++++++++++++++++++++++++++++
fs/nfs/pnfs.c | 1 +
fs/nfs/proc.c | 3 +-
fs/nfs/super.c | 33 ++----------
fs/nfs/unlink.c | 3 +-
include/linux/nfs_fs.h | 1 +
include/linux/nfs_fs_sb.h | 6 +++
include/linux/nfs_xdr.h | 10 +++-
include/linux/sunrpc/bc_xprt.h | 7 +++
net/sunrpc/backchannel_rqst.c | 35 ++++++++++--
net/sunrpc/xprtrdma/backchannel.c | 8 +--
25 files changed, 385 insertions(+), 91 deletions(-)
--
Trond Myklebust
Linux NFS client maintainer, Hammerspace
trondmy@kernel.org, trond.myklebust@hammerspace.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [GIT PULL] Please pull NFS client updates for Linux 6.19
2025-12-11 14:07 [GIT PULL] Please pull NFS client updates for Linux 6.19 Trond Myklebust
@ 2025-12-12 10:09 ` pr-tracker-bot
2025-12-17 9:32 ` NFS dentry caching regression? was " Christoph Hellwig
1 sibling, 0 replies; 7+ messages in thread
From: pr-tracker-bot @ 2025-12-12 10:09 UTC (permalink / raw)
To: Trond Myklebust; +Cc: Linus Torvalds, linux-nfs, linux-kernel
The pull request you sent on Thu, 11 Dec 2025 09:07:42 -0500:
> git://git.linux-nfs.org/projects/trondmy/linux-nfs.git tags/nfs-for-6.19-1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/6bb34aff1ebdd4ee8ea1721068f74d476d707f01
Thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* NFS dentry caching regression? was Re: [GIT PULL] Please pull NFS client updates for Linux 6.19
2025-12-11 14:07 [GIT PULL] Please pull NFS client updates for Linux 6.19 Trond Myklebust
2025-12-12 10:09 ` pr-tracker-bot
@ 2025-12-17 9:32 ` Christoph Hellwig
2025-12-17 9:53 ` Christoph Hellwig
1 sibling, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2025-12-17 9:32 UTC (permalink / raw)
To: Trond Myklebust
Cc: Linus Torvalds, linux-nfs, linux-kernel, Alexander Viro,
Christian Brauner, linux-fsdevel
Hi all,
the merge of this branch causes NFS lookup operation to shoot up a lot
for me. And with merge I mean merge - both parent of the merge on their
own are fine.
With the script below that simulates running python scripts with lots
of imports that was created to benchmark delegation performance, the
number of lookups in the measurement period shoots up from 4 to about
410000, which is a bit suboptimal. I have no idea how this could
happen, but it must be related to some sort of pathname lookup changes
I guess. Other operations looks roughly the same.
---
#!/usr/bin/env bash
set -euo pipefail
if [ $# -ne 1 ]; then
echo "Usage: $0 <NFS_MOUNT_PATH>"
exit 1
fi
NFS_MOUNT="$1"
WARMUP_FILE_COUNT="8000"
RUNS=200
MODULE_COUNT=200
SAVEFILE="/tmp/nfsstat.bak"
echo "=== NFS delegation benchmark ==="
echo "NFS mount: $NFS_MOUNT"
echo "Warmup file count: $WARMUP_FILE_COUNT"
echo "Number of runs: $RUNS"
echo "Module count: $MODULE_COUNT"
echo
################################################################################
# Step 1: Create temporary directory on NFS
################################################################################
TEST_DIR=$(mktemp -d "$NFS_MOUNT/test_deleg_bench.XXXXXX")
MODULE_DIR="$TEST_DIR/pymods"
mkdir -p "$MODULE_DIR/delegtest"
MODDIR_INIT="$MODULE_DIR/delegtest/__init__.py"
cat > "$MODDIR_INIT" <<EOF
import os
import glob
file_paths = glob.glob(os.path.join(os.path.dirname(__file__), "*.py"))
__all__ = [
os.path.basename(f)[:-3]
for f in file_paths
if os.path.isfile(f) and not f.endswith("__init__.py")
]
EOF
echo "[1] Creating $WARMUP_FILE_COUNT tiny files to accumulate delegations..."
mkdir -p "$TEST_DIR/fill"
for i in $(seq 1 "$WARMUP_FILE_COUNT"); do
echo "f$i" > "$TEST_DIR/fill/file_$i"
done
echo "[1] Warmup delegation files created."
################################################################################
# Step 2: Create many tiny Python modules to exercise import workload
################################################################################
echo "[2] Creating $MODULE_COUNT dummy python modules..."
for i in $(seq 1 "$MODULE_COUNT"); do
echo "x = $i" > "$MODULE_DIR/delegtest/mod$i.py"
done
#umount -o remount $NFS_MOUNT
# Python snippet:
# repeatedly import all modN modules; measure iterations completed
BENCH_SCRIPT="$TEST_DIR/bench.py"
cat > "$BENCH_SCRIPT" <<EOF
import sys
sys.path.insert(0, "$MODULE_DIR")
from delegtest import *
EOF
################################################################################
# Step 3: Pre-benchmark NFS client counters
################################################################################
echo "[3] Capturing baseline NFS client stats..."
sync $NFS_MOUNT
#mount -o remount $NFS_MOUNT
cp /proc/net/rpc/nfs $SAVEFILE
################################################################################
# Step 4: Run Python benchmark
################################################################################
echo "[4] Running Python import benchmark..."
time {
for i in $(seq 1 "$RUNS"); do
python3 "$BENCH_SCRIPT"
done
}
################################################################################
# Step 5: Produce NFS client delta report
################################################################################
echo
echo "=== NFS client DELTA REPORT ==="
echo
nfsstat -c -S $SAVEFILE -l
rm -f $SAVEFILE
echo
echo "Test directory: $TEST_DIR"
echo
echo "=== Done ==="
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: NFS dentry caching regression? was Re: [GIT PULL] Please pull NFS client updates for Linux 6.19
2025-12-17 9:32 ` NFS dentry caching regression? was " Christoph Hellwig
@ 2025-12-17 9:53 ` Christoph Hellwig
2025-12-17 14:23 ` [External] : " Anna Schumaker
0 siblings, 1 reply; 7+ messages in thread
From: Christoph Hellwig @ 2025-12-17 9:53 UTC (permalink / raw)
To: Trond Myklebust
Cc: Linus Torvalds, linux-nfs, linux-kernel, Alexander Viro,
Christian Brauner, linux-fsdevel, Anna Schumaker
On Wed, Dec 17, 2025 at 01:32:30AM -0800, Christoph Hellwig wrote:
> Hi all,
>
> the merge of this branch causes NFS lookup operation to shoot up a lot
> for me. And with merge I mean merge - both parent of the merge on their
> own are fine.
>
> With the script below that simulates running python scripts with lots
> of imports that was created to benchmark delegation performance, the
> number of lookups in the measurement period shoots up from 4 to about
> 410000, which is a bit suboptimal. I have no idea how this could
> happen, but it must be related to some sort of pathname lookup changes
> I guess. Other operations looks roughly the same.
To further pin this down, I rebased the patches from the NFS pull request
on top of the baseline (d358e5254674b70f34c847715ca509e46eb81e6f) and
bisected that. This ends up in:
NFS: Shortcut lookup revalidations if we have a directory delegation
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [External] : Re: NFS dentry caching regression? was Re: [GIT PULL] Please pull NFS client updates for Linux 6.19
2025-12-17 9:53 ` Christoph Hellwig
@ 2025-12-17 14:23 ` Anna Schumaker
2025-12-17 22:03 ` Anna Schumaker
0 siblings, 1 reply; 7+ messages in thread
From: Anna Schumaker @ 2025-12-17 14:23 UTC (permalink / raw)
To: Christoph Hellwig, Trond Myklebust
Cc: Linus Torvalds, linux-nfs, linux-kernel, Alexander Viro,
Christian Brauner, linux-fsdevel
Hi Christoph,
On 12/17/25 4:53 AM, Christoph Hellwig wrote:
> On Wed, Dec 17, 2025 at 01:32:30AM -0800, Christoph Hellwig wrote:
>> Hi all,
>>
>> the merge of this branch causes NFS lookup operation to shoot up a lot
>> for me. And with merge I mean merge - both parent of the merge on their
>> own are fine.
>>
>> With the script below that simulates running python scripts with lots
>> of imports that was created to benchmark delegation performance, the
>> number of lookups in the measurement period shoots up from 4 to about
>> 410000, which is a bit suboptimal. I have no idea how this could
>> happen, but it must be related to some sort of pathname lookup changes
>> I guess. Other operations looks roughly the same.
>
> To further pin this down, I rebased the patches from the NFS pull request
> on top of the baseline (d358e5254674b70f34c847715ca509e46eb81e6f) and
> bisected that. This ends up in:
Thanks for reporting this, and for the reproducer script. I'll dig into this
today and try to fix what I broke!
Anna
>
> NFS: Shortcut lookup revalidations if we have a directory delegation
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [External] : Re: NFS dentry caching regression? was Re: [GIT PULL] Please pull NFS client updates for Linux 6.19
2025-12-17 14:23 ` [External] : " Anna Schumaker
@ 2025-12-17 22:03 ` Anna Schumaker
2025-12-18 5:13 ` Christoph Hellwig
0 siblings, 1 reply; 7+ messages in thread
From: Anna Schumaker @ 2025-12-17 22:03 UTC (permalink / raw)
To: Christoph Hellwig, Trond Myklebust
Cc: Linus Torvalds, linux-nfs, linux-kernel, Alexander Viro,
Christian Brauner, linux-fsdevel
Hi Christoph,
On 12/17/25 9:23 AM, Anna Schumaker wrote:
> Hi Christoph,
>
> On 12/17/25 4:53 AM, Christoph Hellwig wrote:
>> On Wed, Dec 17, 2025 at 01:32:30AM -0800, Christoph Hellwig wrote:
>>> Hi all,
>>>
>>> the merge of this branch causes NFS lookup operation to shoot up a lot
>>> for me. And with merge I mean merge - both parent of the merge on their
>>> own are fine.
>>>
>>> With the script below that simulates running python scripts with lots
>>> of imports that was created to benchmark delegation performance, the
>>> number of lookups in the measurement period shoots up from 4 to about
>>> 410000, which is a bit suboptimal. I have no idea how this could
>>> happen, but it must be related to some sort of pathname lookup changes
>>> I guess. Other operations looks roughly the same.
>>
>> To further pin this down, I rebased the patches from the NFS pull request
>> on top of the baseline (d358e5254674b70f34c847715ca509e46eb81e6f) and
>> bisected that. This ends up in:
>
> Thanks for reporting this, and for the reproducer script. I'll dig into this
> today and try to fix what I broke!
>
> Anna
Does the following help? If so, then I'll probably split it up into a couple of
patches before sending to the list.
Thanks,
Anna
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 23a78a742b61..c80f4d2289cd 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1516,14 +1516,6 @@ static int nfs_check_verifier(struct inode *dir, struct dentry *dentry,
if (!nfs_dentry_verify_change(dir, dentry))
return 0;
- /*
- * If we have a directory delegation then we don't need to revalidate
- * the directory. The delegation will either get recalled or we will
- * receive a notification when it changes.
- */
- if (nfs_have_directory_delegation(dir))
- return 0;
-
/* Revalidate nfsi->cache_change_attribute before we declare a match */
if (nfs_mapping_need_revalidate_inode(dir)) {
if (rcu_walk)
@@ -2216,13 +2208,6 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
}
EXPORT_SYMBOL_GPL(nfs_atomic_open);
-static int
-nfs_lookup_revalidate_delegated_parent(struct inode *dir, struct dentry *dentry,
- struct inode *inode)
-{
- return nfs_lookup_revalidate_done(dir, dentry, inode, 1);
-}
-
static int
nfs4_lookup_revalidate(struct inode *dir, const struct qstr *name,
struct dentry *dentry, unsigned int flags)
@@ -2247,12 +2232,10 @@ nfs4_lookup_revalidate(struct inode *dir, const struct qstr *name,
if (inode == NULL)
goto full_reval;
- if (nfs_verifier_is_delegated(dentry))
+ if (nfs_verifier_is_delegated(dentry) ||
+ nfs_have_directory_delegation(dir))
return nfs_lookup_revalidate_delegated(dir, dentry, inode);
- if (nfs_have_directory_delegation(dir))
- return nfs_lookup_revalidate_delegated_parent(dir, dentry, inode);
-
/* NFS only supports OPEN on regular files */
if (!S_ISREG(inode->i_mode))
goto full_reval;
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index ec1ce593dea2..d74cd8659999 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -4830,7 +4830,6 @@ static int _nfs4_proc_access(struct inode *inode, struct nfs_access_entry *entry
int status = 0;
if (!nfs4_have_delegation(inode, FMODE_READ, 0)) {
- nfs_request_directory_delegation(inode);
res.fattr = nfs_alloc_fattr();
if (res.fattr == NULL)
return -ENOMEM;
@@ -5422,6 +5421,10 @@ static int nfs4_proc_readdir(struct nfs_readdir_arg *arg,
.interruptible = true,
};
int err;
+
+ if (arg->plus)
+ nfs_request_directory_delegation(d_inode(arg->dentry));
+
do {
err = _nfs4_proc_readdir(arg, res);
trace_nfs4_readdir(d_inode(arg->dentry), err);
>
>>
>> NFS: Shortcut lookup revalidations if we have a directory delegation
>>
>
>
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [External] : Re: NFS dentry caching regression? was Re: [GIT PULL] Please pull NFS client updates for Linux 6.19
2025-12-17 22:03 ` Anna Schumaker
@ 2025-12-18 5:13 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2025-12-18 5:13 UTC (permalink / raw)
To: Anna Schumaker
Cc: Christoph Hellwig, Trond Myklebust, Linus Torvalds, linux-nfs,
linux-kernel, Alexander Viro, Christian Brauner, linux-fsdevel
On Wed, Dec 17, 2025 at 05:03:06PM -0500, Anna Schumaker wrote:
> Does the following help? If so, then I'll probably split it up into a couple of
> patches before sending to the list.
Yes, this fixed it. Thanks for the quick response!
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-12-18 5:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-11 14:07 [GIT PULL] Please pull NFS client updates for Linux 6.19 Trond Myklebust
2025-12-12 10:09 ` pr-tracker-bot
2025-12-17 9:32 ` NFS dentry caching regression? was " Christoph Hellwig
2025-12-17 9:53 ` Christoph Hellwig
2025-12-17 14:23 ` [External] : " Anna Schumaker
2025-12-17 22:03 ` Anna Schumaker
2025-12-18 5:13 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox