Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Nov 1998 16:18:37 +1100
From:      Bruce Evans <bde@zeta.org.au>
To:        a0074@netcologne.de, bde@zeta.org.au
Cc:        freebsd-bugs@FreeBSD.ORG, freebsd-current@FreeBSD.ORG
Subject:   Re: Correction of nfsstat in 3.0
Message-ID:  <199811300518.QAA24322@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>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-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199811300518.QAA24322>