From owner-freebsd-current@FreeBSD.ORG Wed Jun 3 15:51:52 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE61D106564A for ; Wed, 3 Jun 2009 15:51:52 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-annu.mail.uoguelph.ca (esa-annu.mail.uoguelph.ca [131.104.91.36]) by mx1.freebsd.org (Postfix) with ESMTP id 630998FC0A for ; Wed, 3 Jun 2009 15:51:52 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8GADw5JkqDaFvJ/2dsb2JhbACOKgHEYIQLBQ X-IronPort-AV: E=Sophos;i="4.41,299,1241409600"; d="scan'208";a="35254276" Received: from ganges.cs.uoguelph.ca ([131.104.91.201]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 03 Jun 2009 11:51:51 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ganges.cs.uoguelph.ca (Postfix) with ESMTP id E47E5FB8063 for ; Wed, 3 Jun 2009 11:51:50 -0400 (EDT) X-Virus-Scanned: amavisd-new at ganges.cs.uoguelph.ca Received: from ganges.cs.uoguelph.ca ([127.0.0.1]) by localhost (ganges.cs.uoguelph.ca [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YjZRvI7wcAWW for ; Wed, 3 Jun 2009 11:51:49 -0400 (EDT) Received: from muncher.cs.uoguelph.ca (muncher.cs.uoguelph.ca [131.104.91.102]) by ganges.cs.uoguelph.ca (Postfix) with ESMTP id A8F29FB8042 for ; Wed, 3 Jun 2009 11:51:49 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n53Fr3K29743 for ; Wed, 3 Jun 2009 11:53:03 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Wed, 3 Jun 2009 11:53:03 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: freebsd-current@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Subject: NFS mounts default to a mix of udp and tcp X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2009 15:51:52 -0000 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.