From owner-freebsd-current Sun Nov 29 21:19:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id VAA17616 for freebsd-current-outgoing; Sun, 29 Nov 1998 21:19:15 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.15.68.22]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA17611; Sun, 29 Nov 1998 21:19:10 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id QAA24322; Mon, 30 Nov 1998 16:18:37 +1100 Date: Mon, 30 Nov 1998 16:18:37 +1100 From: Bruce Evans Message-Id: <199811300518.QAA24322@godzilla.zeta.org.au> To: a0074@netcologne.de, bde@zeta.org.au Subject: Re: Correction of nfsstat in 3.0 Cc: freebsd-bugs@FreeBSD.ORG, freebsd-current@FreeBSD.ORG Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >Thank you for your information. I made this changes in my code and nfsstat runs. >If VFS_GENERIC is the wrong one, what's the right one. The right one is in -current (rev.1.36 of kern/vfs_init.c). This was broken in rev.1.35 of kern/vfs_init.c just in time for the 3.0 release. As a workaround for 3.0, you can try using the nfs LKM. This bug only affects certain sysctls for statically configured vfs's, and in 3.0 only nfs has these sysctls (now ffs has some). >I also see thet xsysinfo is not able to schow NFS activities. Is this based on t >he same problems? Maybe. It seems to work here. Bruc e Index: vfs_init.c =================================================================== RCS file: /home/ncvs/src/sys/kern/vfs_init.c,v retrieving revision 1.35 retrieving revision 1.36 diff -c -2 -r1.35 -r1.36 *** vfs_init.c 1998/10/16 03:55:00 1.35 --- vfs_init.c 1998/10/25 10:52:34 1.36 *************** *** 37,41 **** * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 ! * $Id: vfs_init.c,v 1.35 1998/10/16 03:55:00 peter Exp $ */ --- 37,41 ---- * * @(#)vfs_init.c 8.3 (Berkeley) 1/4/94 ! * $Id: vfs_init.c,v 1.36 1998/10/25 10:52:34 bde Exp $ */ *************** *** 279,283 **** vfsp = NULL; - exists = 0; l = &sysctl__vfs; if (vfsconf) --- 279,282 ---- *************** *** 288,308 **** vfc->vfc_typenum = maxvfsconf++; if (vfc->vfc_vfsops->vfs_oid != NULL) { ! oidpp = (struct sysctl_oid **)l->ls_items; ! for (i = l->ls_length; i-- && !exists; oidpp++) ! if (*oidpp == vfc->vfc_vfsops->vfs_oid) exists = 1; - } - if (exists == 0 && vfc->vfc_vfsops->vfs_oid != NULL) { - oidpp = (struct sysctl_oid **)l->ls_items; - for (i = l->ls_length; i--; oidpp++) { - if (*oidpp == NULL || - *oidpp == &sysctl___vfs_mod0 || - *oidpp == &sysctl___vfs_mod1) { - *oidpp = vfc->vfc_vfsops->vfs_oid; - (*oidpp)->oid_number = vfc->vfc_typenum; - sysctl_order_all(); break; } ! } } if (vfsp) --- 287,317 ---- vfc->vfc_typenum = maxvfsconf++; if (vfc->vfc_vfsops->vfs_oid != NULL) { ! /* ! * Attach the oid to the "vfs" node of the sysctl tree if ! * it isn't already there (it will be there for statically ! * configured vfs's). ! */ ! exists = 0; ! for (i = l->ls_length, ! oidpp = (struct sysctl_oid **)l->ls_items; ! i-- != 0; oidpp++) ! if (*oidpp == vfc->vfc_vfsops->vfs_oid) { exists = 1; break; } ! if (exists == 0) ! for (i = l->ls_length, ! oidpp = (struct sysctl_oid **)l->ls_items; ! i-- != 0; oidpp++) { ! if (*oidpp == NULL || ! *oidpp == &sysctl___vfs_mod0 || ! *oidpp == &sysctl___vfs_mod1) { ! *oidpp = vfc->vfc_vfsops->vfs_oid; ! break; ! } ! } ! ! vfc->vfc_vfsops->vfs_oid->oid_number = vfc->vfc_typenum; ! sysctl_order_all(); } if (vfsp) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message