From owner-freebsd-stable@FreeBSD.ORG Thu Feb 18 22:07:25 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2DA41065692; Thu, 18 Feb 2010 22:07:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 5C18E8FC14; Thu, 18 Feb 2010 22:07:24 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o1IM7FBd048682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Feb 2010 00:07:15 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3) with ESMTP id o1IM7FmM042794; Fri, 19 Feb 2010 00:07:15 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.3/8.14.3/Submit) id o1IM7EPZ042793; Fri, 19 Feb 2010 00:07:14 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 19 Feb 2010 00:07:14 +0200 From: Kostik Belousov To: Boris Kochergin Message-ID: <20100218220714.GU50403@deviant.kiev.zoral.com.ua> References: <4B7D74A7.6010006@acm.poly.edu> <4B7D9C5C.1090909@acm.poly.edu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TOcFo/l1T3s1H/TJ" Content-Disposition: inline In-Reply-To: <4B7D9C5C.1090909@acm.poly.edu> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: marius@freebsd.org, Rick Macklem , FreeBSD-STABLE Mailing List Subject: Re: Can't load NFS server module with a custom 8.0 kernel X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Feb 2010 22:07:26 -0000 --TOcFo/l1T3s1H/TJ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Feb 18, 2010 at 03:00:28PM -0500, Boris Kochergin wrote: > Rick Macklem wrote: > > > > > >On Thu, 18 Feb 2010, Boris Kochergin wrote: > > > >>Ahoy. I didn't get any replies to this on -net, so I thought I'd try=20 > >>here. I have an 8.0-RELEASE-p2/amd64 machine running a custom kernel=20 > >>(configuration file at http://acm.poly.edu/~spawk/ACM) and I am=20 > >>unable to use the NFS server module on it. After loading the nfssvc=20 > >>module, attempting to load the nfsserver module fails and the=20 > >>following appears in dmesg: > >> > >>Feb 3 19:35:54 acm kernel: link_elf_obj: symbol svcpool_create=20 > >>undefined > >>Feb 3 19:35:54 acm kernel: linker_load_file: Unsupported file type > >> > >>I see a reference to the problem at=20 > >>http://lists.freebsd.org/pipermail/svn-src-all/2008-November/001025.htm= l.=20 > >>Am I missing something or has it never gotten resolved? Thanks. > >> > >I don't know diddly about the module loading stuff, but you could try > >this patch. (svcpool_create() is a part of the krpc, which is listed > >as a module that nfsserver depends on) > > > >rick > >--- untested patch for nfs_srvsubs.c --- > >--- nfsserver/nfs_srvsubs.c.sav 2010-02-18 14:41:52.000000000 -0500 > >+++ nfsserver/nfs_srvsubs.c 2010-02-18 14:42:12.000000000 -0500 > >@@ -554,7 +554,7 @@ > > nfsrv_modevent, > > NULL, > > }; > >-DECLARE_MODULE(nfsserver, nfsserver_mod, SI_SUB_VFS, SI_ORDER_ANY); > >+DECLARE_MODULE(nfsserver, nfsserver_mod, SI_SUB_VFS, SI_ORDER_FIRST); > > > > /* So that loader and kldload(2) can find us, wherever we are.. */ > > MODULE_VERSION(nfsserver, 1); > Thanks for the patch, but the problem persists with it, I'm afraid. I think this is changed in HEAD, and part of the changes are already in stable/8, which is different from 8.0 too. Anyway, for HEAD nfsserver we need 1. nfscommon 2. nfs_common. Also, nfs_common module is not attached to the build. The patch below gives up on nfs_common, puts that parts into nfscommon, and corrects dependencies for nfsserver and nfsclient. With the patch, I can export and mount nfs filesystem on the HEAD again, with all nfs* stuff loaded as modules. If following this route, sys/modules/nfs_comm= on can be removed. I did not looked into fs/nfs* modules. diff --git a/sys/modules/nfscommon/Makefile b/sys/modules/nfscommon/Makefile index a3d75a7..df8702c 100644 --- a/sys/modules/nfscommon/Makefile +++ b/sys/modules/nfscommon/Makefile @@ -1,8 +1,9 @@ # $FreeBSD$ =20 -.PATH: ${.CURDIR}/../../fs/nfs=20 +.PATH: ${.CURDIR}/../../fs/nfs ${.CURDIR}/../../nfs KMOD=3D nfscommon SRCS=3D vnode_if.h \ + nfs_common.c \ nfs_commonacl.c \ nfs_commonkrpc.c \ nfs_commonport.c \ diff --git a/sys/nfsclient/nfs_vfsops.c b/sys/nfsclient/nfs_vfsops.c index a8f32da..61cd7b8 100644 --- a/sys/nfsclient/nfs_vfsops.c +++ b/sys/nfsclient/nfs_vfsops.c @@ -147,7 +147,7 @@ MODULE_DEPEND(nfs, krpc, 1, 1, 1); #ifdef KGSSAPI MODULE_DEPEND(nfs, kgssapi, 1, 1, 1); #endif -MODULE_DEPEND(nfs, nfs_common, 1, 1, 1); +MODULE_DEPEND(nfs, nfscommon, 1, 1, 1); =20 static struct nfs_rpcops nfs_rpcops =3D { nfs_readrpc, diff --git a/sys/nfsserver/nfs_srvsubs.c b/sys/nfsserver/nfs_srvsubs.c index d84261e..f76c983 100644 --- a/sys/nfsserver/nfs_srvsubs.c +++ b/sys/nfsserver/nfs_srvsubs.c @@ -560,7 +560,7 @@ DECLARE_MODULE(nfsserver, nfsserver_mod, SI_SUB_VFS, SI= _ORDER_ANY); MODULE_VERSION(nfsserver, 1); MODULE_DEPEND(nfsserver, nfssvc, 1, 1, 1); MODULE_DEPEND(nfsserver, krpc, 1, 1, 1); -MODULE_DEPEND(nfsserver, nfs_common, 1, 1, 1); +MODULE_DEPEND(nfsserver, nfscommon, 1, 1, 1); =20 /* * Set up nameidata for a lookup() call and do it. --TOcFo/l1T3s1H/TJ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkt9uhIACgkQC3+MBN1Mb4jRIQCggHO1Y2F9o6J7hmp4IdRT48AK sWoAoMmKyQnja16w7JPzmQIGvUbpiz4W =zr+x -----END PGP SIGNATURE----- --TOcFo/l1T3s1H/TJ--