Skip to content

Commit

Permalink
NFSv4: Set the SKIP_RENEW mount flag
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
EdSchouten committed Oct 2, 2023
1 parent ea695d1 commit e38cac7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e38cac7

Please sign in to comment.