From yar@stylish.chem.msu.su  Fri Jan 14 03:48:02 2005
Return-Path: <yar@stylish.chem.msu.su>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 2805916A4CE
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jan 2005 03:48:02 +0000 (GMT)
Received: from stylish.chem.msu.su (stylish.chem.msu.su [158.250.32.111])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 3894C43D2F
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jan 2005 03:48:01 +0000 (GMT)
	(envelope-from yar@stylish.chem.msu.su)
Received: from stylish.chem.msu.su (localhost [127.0.0.1])
	by stylish.chem.msu.su (8.13.1/8.13.1) with ESMTP id j0E3kWnn001141
	for <FreeBSD-gnats-submit@freebsd.org>; Fri, 14 Jan 2005 06:46:33 +0300 (MSK)
	(envelope-from yar@stylish.chem.msu.su)
Received: (from yar@localhost)
	by stylish.chem.msu.su (8.13.1/8.13.1/Submit) id j0E3kWXJ001140;
	Fri, 14 Jan 2005 06:46:32 +0300 (MSK)
	(envelope-from yar)
Message-Id: <200501140346.j0E3kWXJ001140@stylish.chem.msu.su>
Date: Fri, 14 Jan 2005 06:46:32 +0300 (MSK)
From: Yar Tikhiy <yar@comp.chem.msu.su>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: System cannot guess NFS client module name to autoload it
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         76234
>Category:       kern
>Synopsis:       System cannot guess NFS client module name to autoload it
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    yar
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jan 14 03:50:24 GMT 2005
>Closed-Date:    Thu Mar 03 12:06:54 GMT 2005
>Last-Modified:  Thu Mar 03 12:06:54 GMT 2005
>Originator:     Yar Tikhiy
>Release:        FreeBSD 6.0-CURRENT i386
>Organization:
Moscow State University
>Environment:
System: FreeBSD stylish.chem.msu.su 6.0-CURRENT FreeBSD 6.0-CURRENT #0: Mon Jan 10 21:00:34 MSK 2005 yar@stylish.chem.msu.su:/usr/obj/usr/src/sys/STYLISH i386


>Description:
	The mount(2) syscall handler will attempt autoloading the file system
	module if the file system type to mount isn't there.  To do that, it
	assumes that the file system "foofs" is handled by the module "foofs.ko".
	Therefore it cannot guess the NFS client module name since it's
	"nfsclient.ko", not "nfs.ko".

>How-To-Repeat:

stylish# grep ports /etc/fstab
bsd:/usr/ports          /usr/ports      nfs     ro,noauto       0       0
stylish# ktrace -i mount /usr/ports
nfs: /usr/ports: No such file or directory
stylish# kdump
...
   917 mount_nfs CALL  mount(0x804b15b,0xbfbfe3a4,0x1,0xbfbfe7a4)
   917 mount_nfs NAMI  "/boot/kernel/linker.hints"
   917 mount_nfs NAMI  "/boot/kernel/nfs"
   917 mount_nfs NAMI  "/boot/kernel/nfs.ko"
   917 mount_nfs NAMI  "/boot/modules/linker.hints"
   917 mount_nfs NAMI  "/boot/modules/nfs"
   917 mount_nfs NAMI  "/boot/modules/nfs.ko"
   917 mount_nfs RET   mount -1 errno 2 No such file or directory

>Fix:
	It would be ugly to hardcode this special case in the mount(2)
	handler, a symlink nfs.ko -> nfsclient.ko would be a better solution.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: yar 
State-Changed-When: Thu Mar 3 12:01:54 GMT 2005 
State-Changed-Why:  
I found that the nfsclient module was autoloaded OK if there was 
an up-to-date linker.hints file.  Perhaps the hints file was absent 
or broken when I observed the problem described in this PR. 


Responsible-Changed-From-To: freebsd-bugs->yar 
Responsible-Changed-By: yar 
Responsible-Changed-When: Thu Mar 3 12:01:54 GMT 2005 
Responsible-Changed-Why:  
Don't leave it unassigned. 

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