vcount9
Get total number of references to a device
Usage
#include <sys/param.h>
#include <sys/time.h>
#include <sys/conf.h>
#include <sys/vnode.h>
int
vcount(struct vnode *vp);
int
count_dev(dev_t dev);
Overview
vcount() is used to get the number of references to a particular device. It allows for the fact that multiple vnodes may reference the same device. count_dev() does the same thing as vcount(), but takes a dev_t rather than a struct vnode pointer as an argument.
Return values
vcount() and count_dev() both return the number of references to the device.