NFS: remove revoked delegation from server's delegation list
authorDai Ngo <dai.ngo@oracle.com>
Tue, 8 Oct 2024 22:58:07 +0000 (15:58 -0700)
committerAnna Schumaker <anna.schumaker@oracle.com>
Wed, 9 Oct 2024 19:39:22 +0000 (15:39 -0400)
commit7ef60108069b7e3cc66432304e1dd197d5c0a9b5
tree22f3c889d509e1520aa74204bd42e6c6874cadb0
parent76f5af9952064dc88d41be6fde1fce793ee7eabe
NFS: remove revoked delegation from server's delegation list

After the delegation is returned to the NFS server remove it
from the server's delegations list to reduce the time it takes
to scan this list.

Network trace captured while running the below script shows the
time taken to service the CB_RECALL increases gradually due to
the overhead of traversing the delegation list in
nfs_delegation_find_inode_server.

The NFS server in this test is a Solaris server which issues
CB_RECALL when receiving the all-zero stateid in the SETATTR.

mount=/mnt/data
for i in $(seq 1 20)
do
   echo $i
   mkdir $mount/testtarfile$i
   time  tar -C $mount/testtarfile$i -xf 5000_files.tar
done

Signed-off-by: Dai Ngo <dai.ngo@oracle.com>
Reviewed-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <anna.schumaker@oracle.com>
fs/nfs/delegation.c