Correct int/long type mismatch in the proper place this time. freevnodes

and numvnodes are longs in the kernel.  They should remain longs in systat,
what really needs to change is that they should be using SYSCTL_LONG rather
than SYSCTL_INT.   I also changed wantfreevnodes to SYSCTL_LONG because I
happened to notice it.

I wish there was a way to find all of these automatically..

Pointed out by: bde
This commit is contained in:
Andrew Gallatin 2000-12-02 20:08:33 +00:00
parent 247e7cb1d3
commit 19f085228f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=69529
3 changed files with 8 additions and 8 deletions

View File

@ -92,7 +92,7 @@ static void vclean __P((struct vnode *vp, int flags, struct proc *p));
* allocates a new vnode, never decreased.
*/
static unsigned long numvnodes;
SYSCTL_INT(_debug, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "");
SYSCTL_LONG(_debug, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "");
/*
* Conversion tables for conversion from vnode types to inode formats
@ -117,10 +117,10 @@ static TAILQ_HEAD(freelst, vnode) vnode_free_list;
* getnewvnode() will return a newly allocated vnode.
*/
static u_long wantfreevnodes = 25;
SYSCTL_INT(_debug, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, "");
SYSCTL_LONG(_debug, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, "");
/* Number of vnodes in the free list. */
static u_long freevnodes = 0;
SYSCTL_INT(_debug, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "");
SYSCTL_LONG(_debug, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "");
/*
* Various variables used for debugging the new implementation of

View File

@ -92,7 +92,7 @@ static void vclean __P((struct vnode *vp, int flags, struct proc *p));
* allocates a new vnode, never decreased.
*/
static unsigned long numvnodes;
SYSCTL_INT(_debug, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "");
SYSCTL_LONG(_debug, OID_AUTO, numvnodes, CTLFLAG_RD, &numvnodes, 0, "");
/*
* Conversion tables for conversion from vnode types to inode formats
@ -117,10 +117,10 @@ static TAILQ_HEAD(freelst, vnode) vnode_free_list;
* getnewvnode() will return a newly allocated vnode.
*/
static u_long wantfreevnodes = 25;
SYSCTL_INT(_debug, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, "");
SYSCTL_LONG(_debug, OID_AUTO, wantfreevnodes, CTLFLAG_RW, &wantfreevnodes, 0, "");
/* Number of vnodes in the free list. */
static u_long freevnodes = 0;
SYSCTL_INT(_debug, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "");
SYSCTL_LONG(_debug, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "");
/*
* Various variables used for debugging the new implementation of

View File

@ -80,8 +80,8 @@ static struct Info {
long *intrcnt;
int bufspace;
int desiredvnodes;
int numvnodes;
int freevnodes;
long numvnodes;
long freevnodes;
long numdirtybuffers;
} s, s1, s2, z;