]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
NFS: use a hash table for delegation lookup
authorChristoph Hellwig <hch@lst.de>
Fri, 18 Jul 2025 08:14:50 +0000 (10:14 +0200)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Tue, 22 Jul 2025 12:10:41 +0000 (08:10 -0400)
commitf5b3108e6a14418b120a3c38ca589b8d6cf87627
tree8ba599afdc2b384122ae7a8e613c0c6f874b34f8
parent2fb4af5ea3c735a205d97de10f044f809b20af51
NFS: use a hash table for delegation lookup

nfs_delegation_find_inode currently has to walk the entire list of
delegations per inode, which can become pretty large, and can become even
larger when increasing the delegation watermark.

Add a hash table to speed up the delegation lookup, sized as a fraction
of the delegation watermark.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20250718081509.2607553-6-hch@lst.de
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/delegation.c
fs/nfs/delegation.h
fs/nfs/nfs4client.c
fs/nfs/nfs4proc.c
include/linux/nfs_fs_sb.h