Skip to content

Commit

Permalink
track new vnode creation
Browse files Browse the repository at this point in the history
  • Loading branch information
kmacy committed Jan 8, 2009
1 parent bc4f91b commit 8f378f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sys/kern/vfs_subr.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,9 @@ SYSCTL_LONG(_vfs, OID_AUTO, freevnodes, CTLFLAG_RD, &freevnodes, 0, "");
static int reassignbufcalls;
SYSCTL_INT(_vfs, OID_AUTO, reassignbufcalls, CTLFLAG_RW, &reassignbufcalls, 0, "");

static int newvnodes;
SYSCTL_INT(_vfs, OID_AUTO, newvnodes, CTLFLAG_RD, &newvnodes, 0, "");

/*
* Cache for the mount type id assigned to NFS. This is used for
* special checks in nfs/nfs_nqlease.c and vm/vnode_pager.c.
Expand Down Expand Up @@ -922,6 +925,8 @@ getnewvnode(const char *tag, struct mount *mp, struct vop_vector *vops,
struct bufobj *bo;

mtx_lock(&vnode_free_list_mtx);
newvnodes++;

/*
* Lend our context to reclaim vnodes if they've exceeded the max.
*/
Expand Down

0 comments on commit 8f378f6

Please sign in to comment.