Skip to content

Commit 7ef6010

Browse files
daimngoAnna Schumaker
authored andcommitted
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 <[email protected]> Reviewed-by: Trond Myklebust <[email protected]> Signed-off-by: Anna Schumaker <[email protected]>
1 parent 76f5af9 commit 7ef6010

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

fs/nfs/delegation.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1001,6 +1001,11 @@ void nfs_delegation_mark_returned(struct inode *inode,
10011001
}
10021002

10031003
nfs_mark_delegation_revoked(delegation);
1004+
clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags);
1005+
spin_unlock(&delegation->lock);
1006+
if (nfs_detach_delegation(NFS_I(inode), delegation, NFS_SERVER(inode)))
1007+
nfs_put_delegation(delegation);
1008+
goto out_rcu_unlock;
10041009

10051010
out_clear_returning:
10061011
clear_bit(NFS_DELEGATION_RETURNING, &delegation->flags);

0 commit comments

Comments
 (0)