From owner-svn-src-head@FreeBSD.ORG Tue Sep 15 23:19:08 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3946C106566C; Tue, 15 Sep 2009 23:19:08 +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 B223E8FC08; Tue, 15 Sep 2009 23:19:07 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAPe2r0qDaFvJ/2dsb2JhbADgAoQXBQ X-IronPort-AV: E=Sophos;i="4.44,392,1249272000"; d="scan'208";a="46434794" Received: from ganges.cs.uoguelph.ca ([131.104.91.201]) by esa-annu-pri.mail.uoguelph.ca with ESMTP; 15 Sep 2009 18:49:57 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ganges.cs.uoguelph.ca (Postfix) with ESMTP id CE2C6FB80B0; Tue, 15 Sep 2009 18:49:57 -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 LDhdsKnfNoea; Tue, 15 Sep 2009 18:49:56 -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 8E683FB8064; Tue, 15 Sep 2009 18:49:56 -0400 (EDT) Received: from localhost (rmacklem@localhost) by muncher.cs.uoguelph.ca (8.11.7p3+Sun/8.11.6) with ESMTP id n8FMtLB23601; Tue, 15 Sep 2009 18:55:21 -0400 (EDT) X-Authentication-Warning: muncher.cs.uoguelph.ca: rmacklem owned process doing -bs Date: Tue, 15 Sep 2009 18:55:21 -0400 (EDT) From: Rick Macklem X-X-Sender: rmacklem@muncher.cs.uoguelph.ca To: "Bjoern A. Zeeb" In-Reply-To: <20090915150034.U68375@maildrop.int.zabbadoz.net> Message-ID: References: <200909150101.n8F113sU071311@svn.freebsd.org> <20090915150034.U68375@maildrop.int.zabbadoz.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, Qing Li , svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r197210 - in head/sys: netinet nfsclient X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 15 Sep 2009 23:19:08 -0000 On Tue, 15 Sep 2009, Bjoern A. Zeeb wrote: > On Tue, 15 Sep 2009, Qing Li wrote: > >> Author: qingli >> Date: Tue Sep 15 01:01:03 2009 >> New Revision: 197210 >> URL: http://svn.freebsd.org/changeset/base/197210 >> >> Log: >> The bootp code installs an interface address and the nfs client >> module tries to install the same address again. This extra code >> is removed, which was discovered by the removal of a call to >> in_ifscrub() in r196714. This call to in_ifscrub is put back here >> because the SIOCAIFADDR command can be used to change the prefix >> length of an existing alias. >> >> Reviewed by: kmacy > > This broke NFS Root for me in the netperf clsuter setup. > The NFS Root mount hang for ages (I reset the box after 1 hour). > > Backing out r197212 and this and it boots just fine again. > I don't know diddly about diskless booting and have no setup to test, but if I understood the problem, might something like the following work? rick --- nfsclient/nfs_vfsops.c.sav 2009-09-15 18:39:32.000000000 -0400 +++ nfsclient/nfs_vfsops.c 2009-09-15 18:41:52.000000000 -0400 @@ -416,13 +416,14 @@ struct socket *so; struct vnode *vp; struct ifreq ir; - int error; + int error, doioctl = 1; u_long l; char buf[128]; char *cp; #if defined(BOOTP_NFSROOT) && defined(BOOTP) bootpc_init(); /* use bootp to get nfs_diskless filled in */ + doioctl = 0; #elif defined(NFS_ROOT) nfs_setup_diskless(); #endif @@ -463,9 +464,11 @@ break; } #endif - error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, td); - if (error) - panic("nfs_mountroot: SIOCAIFADDR: %d", error); + if (doioctl) { + error = ifioctl(so, SIOCAIFADDR, (caddr_t)&nd->myif, td); + if (error) + panic("nfs_mountroot: SIOCAIFADDR: %d", error); + } if ((cp = getenv("boot.netif.mtu")) != NULL) { ir.ifr_mtu = strtol(cp, NULL, 10); bcopy(nd->myif.ifra_name, ir.ifr_name, IFNAMSIZ);