From e38cac78a230cda14109497ceda77f5c55846f75 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Mon, 2 Oct 2023 21:56:00 +0200 Subject: [PATCH] NFSv4: Set the SKIP_RENEW mount flag This causes the NFSv4 client to only issue RENEW calls against the server in case the client actually has files opened. In addition to reducing the number of operations when idle, it has the advantage that the server can purge its client state more aggressively. --- pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go b/pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go index 6459c22e..13c35e72 100644 --- a/pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go +++ b/pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go @@ -149,10 +149,12 @@ func (m *nfsv4Mount) mount(terminationGroup program.Group, rpcServer *rpcserver. attrMask[0] |= 1 << nfs_sys_prot.NFS_MATTR_FLAGS flags := nfs_sys_prot.NfsMattrFlags{ Mask: []uint32{ - 1 << nfs_sys_prot.NFS_MFLAG_NOCALLBACK, + (1 << nfs_sys_prot.NFS_MFLAG_NOCALLBACK) | + (1 << nfs_sys_prot.NFS_MFLAG_SKIP_RENEW), }, Value: []uint32{ - 1 << nfs_sys_prot.NFS_MFLAG_NOCALLBACK, + (1 << nfs_sys_prot.NFS_MFLAG_NOCALLBACK) | + (1 << nfs_sys_prot.NFS_MFLAG_SKIP_RENEW), }, } flags.WriteTo(&attrVals)