Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Sep 2009 18:55:21 -0400 (EDT)
From:      Rick Macklem <rmacklem@uoguelph.ca>
To:        "Bjoern A. Zeeb" <bz@FreeBSD.org>
Cc:        svn-src-head@FreeBSD.org, Qing Li <qingli@FreeBSD.org>, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r197210 - in head/sys: netinet nfsclient
Message-ID:  <Pine.GSO.4.63.0909151853200.23388@muncher.cs.uoguelph.ca>
In-Reply-To: <20090915150034.U68375@maildrop.int.zabbadoz.net>
References:  <200909150101.n8F113sU071311@svn.freebsd.org> <20090915150034.U68375@maildrop.int.zabbadoz.net>

next in thread | previous in thread | raw e-mail | index | archive | help


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);



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