From dunstan@freebsd.czest.pl  Sun Feb 13 00:05:45 2005
Return-Path: <dunstan@freebsd.czest.pl>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id CEC3316A4CE
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 13 Feb 2005 00:05:45 +0000 (GMT)
Received: from freebsd.czest.pl (silver.iplus.pl [80.48.250.4])
	by mx1.FreeBSD.org (Postfix) with ESMTP id EB45F43D46
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 13 Feb 2005 00:05:44 +0000 (GMT)
	(envelope-from dunstan@freebsd.czest.pl)
Received: from freebsd.czest.pl (freebsd.czest.pl [80.48.250.4])
	by freebsd.czest.pl (8.12.10/8.12.9) with ESMTP id j1D0Ax9v000841
	for <FreeBSD-gnats-submit@FreeBSD.org>; Sun, 13 Feb 2005 00:11:00 GMT
	(envelope-from dunstan@freebsd.czest.pl)
Received: (from dunstan@localhost)
	by freebsd.czest.pl (8.12.10/8.12.9/Submit) id j1CNb0ew000797;
	Sat, 12 Feb 2005 23:37:01 GMT
	(envelope-from dunstan)
Message-Id: <200502122337.j1CNb0ew000797@freebsd.czest.pl>
Date: Sat, 12 Feb 2005 23:37:01 GMT
From: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
Reply-To: "Wojciech A. Koszek" <dunstan@freebsd.czest.pl>
To: FreeBSD-gnats-submit@FreeBSD.org
Cc:
Subject: [PATCH] It is not possible to load nfs4client.ko
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         77432
>Category:       kern
>Synopsis:       [nfs] [patch] It is not possible to load nfs4client.ko
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 13 00:10:22 GMT 2005
>Closed-Date:    Mon Nov 19 08:24:39 UTC 2007
>Last-Modified:  Mon Nov 19 08:24:39 UTC 2007
>Originator:     Wojciech A. Koszek
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:

System: FreeBSD dunstan.freebsd.czest.pl 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Feb 12 11:15:23 CET 2005 root@dunstan.freebsd.czest.pl:/usr/obj/usr/src/sys/HOME6 i386

--
kern.ostype: FreeBSD
kern.osrelease: 5.3-STABLE
kern.osrevision: 199506
kern.version: FreeBSD 5.3-STABLE #0: Sat Feb 12 11:15:23 CET 2005
   root@dunstan.freebsd.czest.pl:/usr/obj/usr/src/sys/HOME6
--
kern.ostype: FreeBSD
kern.osrelease: 6.0-CURRENT
kern.osrevision: 199506
kern.version: FreeBSD 6.0-CURRENT #2: Sat Feb 12 10:43:18 UTC 2005
    root@:/usr/obj/usr/src/sys/GENERIC
--

>Description:

It is not possible to load nfs4client.ko because kernel linker complains about
some symbols (which are missing):
root@dunstan:/usr/src/sys/modules/nfs4client:# make load
/sbin/kldload -v /usr/src/sys/modules/nfs4client/nfs4client.ko
kldload: can't load /usr/src/sys/modules/nfs4client/nfs4client.ko: No such
file or directory
*** Error code 1

Stop in /usr/src/sys/modules/nfs4client.
root@dunstan:/usr/src/sys/modules/nfs4client:# dmesg | tail -1
link_elf: symbol nfs_writebp undefined

It seems this symbols exist in code shared between nfs4client and nfsclient.

>How-To-Repeat:

# cd /sys/modules/nfs4client/
# make load

>Fix:
Patch [nfs4client.Makefile] corrects this bug by compiling files taken from
nfsclient and linking them to nfs4client.ko. Tested on -STABLE and -CURRENT.

** From the original submitter:  The issue comes when nfsclient is not
** compiled into the kernel and is not loaded into it.  This does not
** happen in GENERIC kernel.
**					-- delphij

--- nfs4client.Makefile begins here ---

diff -upr /usr/src/sys/modules/nfs4client/Makefile src/sys/modules/nfs4client/Makefile
--- /usr/src/sys/modules/nfs4client/Makefile	Fri Jul  9 00:35:35 2004
+++ src/sys/modules/nfs4client/Makefile	Sat Feb 12 22:10:02 2005
@@ -8,7 +8,8 @@ SRCS=	vnode_if.h \
 	nfs_common.c \
 	opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h \
 	nfs4_dev.c nfs4_idmap.c nfs4_socket.c nfs4_subs.c \
-	nfs4_vfs_subs.c  nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c
+	nfs4_vfs_subs.c  nfs4_vfsops.c nfs4_vn_subs.c nfs4_vnops.c \
+	nfs_socket.c nfs_subs.c nfs_vfsops.c nfs_vnops.c
 SRCS+=	opt_inet6.h
 
 NFS_INET?=	1	# 0/1 - requires INET to be configured in kernel
--- nfs4client.Makefile ends here ---

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: delphij 
State-Changed-When: Sun Feb 13 05:38:59 GMT 2005 
State-Changed-Why:  
Duplicate of 77421 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77432 
State-Changed-From-To: closed->open 
State-Changed-By: delphij 
State-Changed-When: Sun Feb 13 07:08:05 GMT 2005 
State-Changed-Why:  
Re-open.  Not duplicate of kern/77421. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77432 
Responsible-Changed-From-To: freebsd-bugs->rees 
Responsible-Changed-By: maxim 
Responsible-Changed-When: Fri Apr 14 10:48:33 UTC 2006 
Responsible-Changed-Why:  
Jim, another NFS4 PR for you.  The patch in it looks correct. 
Let me know if you want I commit this code. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77432 

From: Ruslan Ermilov <ru@freebsd.org>
To: Maxim Konovalov <maxim@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: kern/77432: [nfs] [patch] It is not possible to load nfs4client.ko
Date: Fri, 14 Apr 2006 14:42:31 +0300

 On Fri, Apr 14, 2006 at 10:51:00AM +0000, Maxim Konovalov wrote:
 > Synopsis: [nfs] [patch] It is not possible to load nfs4client.ko
 > 
 > Responsible-Changed-From-To: freebsd-bugs->rees
 > Responsible-Changed-By: maxim
 > Responsible-Changed-When: Fri Apr 14 10:48:33 UTC 2006
 > Responsible-Changed-Why: 
 > Jim, another NFS4 PR for you.  The patch in it looks correct.
 > Let me know if you want I commit this code.
 > 
 I think this is unreasonable to commit such a patch; it's easy
 to imagine a situation where both mount_nfs and mount_nfs4 are
 needed at the same time.  I think nfs4client.ko needs to grow
 the dependency on nfsclient.ko instead; given that we only have
 the NFSCLIENT kernel option it looks more reasonable.
 
 (BTW, the nfs4client module isn't connected to a build.)
 
 
 Cheers,
 -- 
 Ruslan Ermilov
 ru@FreeBSD.org
 FreeBSD committer
Responsible-Changed-From-To: rees->cel 
Responsible-Changed-By: rees 
Responsible-Changed-When: Tue Apr 18 15:29:54 EDT 2006 
Responsible-Changed-Why:  
cel has agreed to fix this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77432 
Responsible-Changed-From-To: cel->freebsd-bugs 
Responsible-Changed-By: cel 
Responsible-Changed-When: Mon Mar 12 15:29:26 UTC 2007 
Responsible-Changed-Why:  
Back to the public pool. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77432 
State-Changed-From-To: open->closed 
State-Changed-By: kmacy 
State-Changed-When: Mon Nov 19 08:24:00 UTC 2007 
State-Changed-Why:  

In tree NFSv4 is not currently supported anddoes not work :-( 

http://www.freebsd.org/cgi/query-pr.cgi?pr=77432 
>Unformatted:
