Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Jun 2009 11:53:03 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        freebsd-current@freebsd.org
Subject:   NFS mounts default to a mix of udp and tcp
Message-ID:  <Pine.GSO.4.63.0906031152270.29709@muncher.cs.uoguelph.ca>

next in thread | raw e-mail | index | archive | help
Although it doesn't explain the problem with nfs mounts over udp where the
mountd doesn't seem to reply, this might explain some of the confusion.

Near the beginning of mount_nfs.c, "nfsproto" is initialized to IPPROTO_UDP
and, as such, by default, the mount protocol and NFS Null RPC is done over
"udp". However, the -current kernel code in sys/nfsclient/nfs_vfsops.c and
the system call done by mount_nfs.c defaults to "tcp".

Therefore, unless "udp" or "tcp" is explicitly specified as mount_nfs options,
it uses "udp" for the mount protocol and Null RPC, then switches to "tcp" from
there on.

This wasn't something I changed, so I think it has been this way since the
nmount() syscall was introduced.

Seems like the default should be all "tcp" or all "udp". Which do you think
it should be?

rick
ps: This would explain a case where a server only supports udp and the mount
     didn't explicitly specify "udp", but it doesn't explain why mounts seem
     to be intermittently failing.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.63.0906031152270.29709>