VCOUNT(9) BSD Kernel Developer's Manual VCOUNT(9)NAME
vcount, count_dev — get total number of references to a device
SYNOPSIS
#include <sys/conf.h>
#include <sys/vnode.h>
int
vcount(struct vnode *vp);
int
count_dev(cdev_t dev);
DESCRIPTIONvcount() is used to get the number of references to a special device.
This makes sense because multiple vnodes may reference the same device.
count_dev() does the same thing as vcount(), but takes a cdev_t rather
than a struct vnode pointer as an argument. It may only be called for
VBLK and VCHR vnodes since v_rdev is an overloaded field.
RETURN VALUESvcount() and count_dev() both return the number of references to the
device.
SEE ALSOvnode(9)BSD December 14, 2009 BSD