Date: Tue, 18 Jun 96 09:47:00 PDT From: Duncan Barclay <Duncan.Barclay@pa-consulting.com> To: send-pr <FreeBSD-gnats-submit@freebsd.org> Subject: bin/1332: changes to amd and possible nfs lkm bug? Message-ID: <31C6E012@SMTPGATE.PA-CONSULTING.COM> Resent-Message-ID: <199606180900.CAA11499@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
Note: There was a bad value `sw' for the field `>Class:'. It was set to the default value of `sw-bug'. >Number: 1332 >Category: bin >Synopsis: changes to amd and possible nfs lkm bug? >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Jun 18 02:00:05 PDT 1996 >Last-Modified: >Originator: Duncan Barclay & >Organization: PA-Consulting >Release: FreeBSD 2.1-STABLE i386 >Environment: 486DX33, 8MB RAM UMC motherboard. >Description: Dear All Over the weekend I decided to try and get amd to help me mount floppies. After reading the manuals and understanding it I got down to work but it didnt. After a while it dawned on me that amd uses nfs, ergo one needs nfs in the kernel, as I run a standalone machine I dont have nfs compiled into my kernel. Ahh I thought what about the nfs lkm? Does it load using modload...no panic after panic after panic. However all was not lost, run mountd or nfsd or nfsiod and the lkm is installed correctly. So patch up amd to check for nfs and load the module if it is not there. Diffs included I have found than I get a rpc error: clnttcp_create when amd is started up. I think this is due to amd trying to find the mountd, but I dont know why it's doing this. It doesnt seem to stop the thing running. Duncan Barclay >How-To-Repeat: >Fix: Diff betwenn 2.1.0R Live Filesystem source and my hacked amd diff -c amd/ChangeLog /cdrom/usr/src/usr.sbin/amd/amd/ChangeLog *** amd/ChangeLog Sun Feb 18 13:16:45 1996 --- /cdrom/usr/src/usr.sbin/amd/amd/ChangeLog Wed May 25 15:22:04 1994 *************** *** 1,13 **** - Sun Feb 17 1996 Duncan Barclay - * (amd.c) Added in LKM checking for nfs. - - * (ufs_ops.c) Removed FS_NOTIMEOUT flag for ufs filesystems - so that they can timeout on floppy disks. - This may really break if amd is started with a -r flag. I - haven't tried it... - - * Also updated manpage to refelct LKM bit. - Sun Jun 7 19:01:37 1992 Jan-Simon Pendry (jsp at achilles) * Code cut for BSD 4.4 alpha. --- 1,3 ---- diff -c amd/Makefile /cdrom/usr/src/usr.sbin/amd/amd/Makefile *** amd/Makefile Sun Feb 18 13:12:58 1996 --- /cdrom/usr/src/usr.sbin/amd/amd/Makefile Sun Aug 7 10:04:11 1994 *************** *** 28,32 **** .PATH: ${.CURDIR}/../rpcx ${.CURDIR}/../config .include "Makefile.config" ! .include "../Makefile.inc" .include <bsd.prog.mk> --- 28,32 ---- .PATH: ${.CURDIR}/../rpcx ${.CURDIR}/../config .include "Makefile.config" ! .include "../../Makefile.inc" .include <bsd.prog.mk> diff -c amd/amd.8 /cdrom/usr/src/usr.sbin/amd/amd/amd.8 *** amd/amd.8 Sun Feb 18 13:06:21 1996 --- /cdrom/usr/src/usr.sbin/amd/amd/amd.8 Wed May 25 15:22:02 1994 *************** *** 183,204 **** .Fl v option and a fuller description is available in the program source. - .Pp - If - .Nm amd - detects that the running kernel does not include - .Tn NFS - support, it will attempt to load a loadable kernel module containing - .Tn NFS - code, using - .Xr modload 8 - by way of - .Xr vfsload 3 . - If this fails, or no - .Tn NFS - LKM was available, - .Nm amd - exits with an error. .Sh FILES .Bl -tag -width /axx .It Pa /a --- 183,188 ---- diff -c amd/amd.c /cdrom/usr/src/usr.sbin/amd/amd/amd.c *** amd/amd.c Sun Feb 18 12:56:57 1996 --- /cdrom/usr/src/usr.sbin/amd/amd/amd.c Wed May 25 15:22:00 1994 *************** *** 56,62 **** #include <sys/ioctl.h> #include <fcntl.h> #include <setjmp.h> - #include <err.h> char pid_fsname[16 + MAXHOSTNAMELEN]; /* "kiska.southseas.nz:(pid%d)" */ char *progname; /* "amd" */ --- 56,61 ---- *************** *** 196,220 **** char *domdot; int ppid = 0; int error; - struct vfsconf *vfc; /* ! * Make sure some built-in assumptions are true before we start. ! * Like NFS is in the kernel. (dmlb 18/2/96) */ - vfc = getvfsbyname("nfs"); - if(!vfc && vfsisloadable("nfs")) { - if(vfsload("nfs")) - err(1, "vfsload(nfs)"); - endvfsent(); /* flush cache */ - vfc = getvfsbyname("nfs"); - } - - if(!vfc) { - errx(1, "NFS support is not available in the running kernel"); - } - - #define MAXNFSDCNT 20 assert(sizeof(nfscookie) >= sizeof (unsigned int)); assert(sizeof(int) >= 4); --- 195,204 ---- char *domdot; int ppid = 0; int error; /* ! * Make sure some built-in assumptions are true before we start */ assert(sizeof(nfscookie) >= sizeof (unsigned int)); assert(sizeof(int) >= 4); diff -c amd/ufs_ops.c /cdrom/usr/src/usr.sbin/amd/amd/ufs_ops.c *** amd/ufs_ops.c Sat Feb 17 23:46:16 1996 --- /cdrom/usr/src/usr.sbin/amd/amd/ufs_ops.c Wed May 25 15:22:02 1994 *************** *** 169,185 **** 0, /* ufs_umounted */ find_afs_srvr, #ifdef FLUSH_KERNEL_NAME_CACHE ! FS_MKMNT|FS_UBACKGROUND|FS_AMQINFO #else /* FLUSH_KERNEL_NAME_CACHE */ ! FS_MKMNT|FS_UBACKGROUND|FS_AMQINFO #endif /* FLUSH_KERNEL_NAME_CACHE */ }; - /* dmlb 2/96 - * The above two options lines used to read - * FS_MKMNT|FS_NOTIMEOUT|FS_UBACKGROUND|FS_AMQINFO - * which means that ufs file systems cannot timeout. - * I removed this so that I can mount floppys and unmount them okay - * - */ #endif /* HAS_UFS */ --- 169,178 ---- 0, /* ufs_umounted */ find_afs_srvr, #ifdef FLUSH_KERNEL_NAME_CACHE ! FS_MKMNT|FS_NOTIMEOUT|FS_UBACKGROUND|FS_AMQINFO #else /* FLUSH_KERNEL_NAME_CACHE */ ! FS_MKMNT|FS_NOTIMEOUT|FS_UBACKGROUND|FS_AMQINFO #endif /* FLUSH_KERNEL_NAME_CACHE */ }; #endif /* HAS_UFS */ >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31C6E012>