Skip to content

Commit 8a43a77

Browse files
committed
Make macOS NFSv4 minor version selection more complete
Depending on the version of the operating system, we can either use NFSv4.0 or NFSv4.1.
1 parent 2c788ba commit 8a43a77

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pkg/filesystem/virtual/configuration/nfsv4_mount_darwin.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,16 @@ func (m *nfsv4Mount) mount(terminationGroup program.Group, rpcServer *rpcserver.
160160
flags.WriteTo(&attrVals)
161161

162162
// Request the use of the desired NFSv4 protocol minor version.
163+
// If no minor version is specified, use the latest version that
164+
// is supported by the operating system.
163165
attrMask[0] |= 1 << nfs_sys_prot.NFS_MATTR_NFS_VERSION
164166
nfs_sys_prot.WriteNfsMattrNfsVersion(&attrVals, 4)
165167
attrMask[0] |= 1 << nfs_sys_prot.NFS_MATTR_NFS_MINOR_VERSION
166168
if msg := osConfiguration.MinorVersion; msg != nil {
167169
nfs_sys_prot.WriteNfsMattrNfsMinorVersion(&attrVals, msg.Value)
170+
} else if buildVersion.greaterEqual(25, 'A', 117) {
171+
nfs_sys_prot.WriteNfsMattrNfsMinorVersion(&attrVals, 1)
168172
} else {
169-
// macOS currently only supports NFSv4.0.
170173
nfs_sys_prot.WriteNfsMattrNfsMinorVersion(&attrVals, 0)
171174
}
172175

0 commit comments

Comments
 (0)