Skip to content

Commit

Permalink
Make macOS NFSv4 minor version selection more complete
Browse files Browse the repository at this point in the history
Depending on the version of the operating system, we can either use
NFSv4.0 or NFSv4.1.
  • Loading branch information
EdSchouten committed Oct 30, 2024
1 parent 2c788ba commit 8a43a77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,16 @@ func (m *nfsv4Mount) mount(terminationGroup program.Group, rpcServer *rpcserver.
flags.WriteTo(&attrVals)

// Request the use of the desired NFSv4 protocol minor version.
// If no minor version is specified, use the latest version that
// is supported by the operating system.
attrMask[0] |= 1 << nfs_sys_prot.NFS_MATTR_NFS_VERSION
nfs_sys_prot.WriteNfsMattrNfsVersion(&attrVals, 4)
attrMask[0] |= 1 << nfs_sys_prot.NFS_MATTR_NFS_MINOR_VERSION
if msg := osConfiguration.MinorVersion; msg != nil {
nfs_sys_prot.WriteNfsMattrNfsMinorVersion(&attrVals, msg.Value)
} else if buildVersion.greaterEqual(25, 'A', 117) {

This comment has been minimized.

Copy link
@yelite

yelite Nov 2, 2024

Hi, does this mean MacOS after 25A117 has nfs v4.1 client? Is there any public reference about nfs v4.1 on MacOS?

nfs_sys_prot.WriteNfsMattrNfsMinorVersion(&attrVals, 1)
} else {
// macOS currently only supports NFSv4.0.
nfs_sys_prot.WriteNfsMattrNfsMinorVersion(&attrVals, 0)
}

Expand Down

0 comments on commit 8a43a77

Please sign in to comment.