FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/mount.h>
#include <sys/rwlock.h>
#include <sys/vnode.h>
Go to the source code of this file.
Functions | |
__FBSDID ("$FreeBSD$") | |
static | MALLOC_DEFINE (M_VFS_HASH, "vfs_hash", "VFS hash table") |
static | LIST_HEAD (vfs_hash_head, vnode) |
SYSINIT (vfs_hash, SI_SUB_VFS, SI_ORDER_SECOND, vfs_hashinit, NULL) | |
u_int | vfs_hash_index (struct vnode *vp) |
static struct vfs_hash_head * | vfs_hash_bucket (const struct mount *mp, u_int hash) |
int | vfs_hash_get (const struct mount *mp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg) |
void | vfs_hash_ref (const struct mount *mp, u_int hash, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg) |
void | vfs_hash_remove (struct vnode *vp) |
int | vfs_hash_insert (struct vnode *vp, u_int hash, int flags, struct thread *td, struct vnode **vpp, vfs_hash_cmp_t *fn, void *arg) |
void | vfs_hash_rehash (struct vnode *vp, u_int hash) |
void | vfs_hash_changesize (u_long newmaxvnodes) |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 43 of file vfs_hash.c.
|
static |
SYSINIT | ( | vfs_hash | , |
SI_SUB_VFS | , | ||
SI_ORDER_SECOND | , | ||
vfs_hashinit | , | ||
NULL | |||
) |
|
static |
Definition at line 68 of file vfs_hash.c.
Referenced by vfs_hash_changesize(), vfs_hash_get(), vfs_hash_insert(), vfs_hash_ref(), and vfs_hash_rehash().
void vfs_hash_changesize | ( | u_long | newmaxvnodes | ) |
Definition at line 209 of file vfs_hash.c.
References free(), hashinit(), and vfs_hash_bucket().
Referenced by sysctl_maxvnodes().
int vfs_hash_get | ( | const struct mount * | mp, |
u_int | hash, | ||
int | flags, | ||
struct thread * | td, | ||
struct vnode ** | vpp, | ||
vfs_hash_cmp_t * | fn, | ||
void * | arg | ||
) |
Definition at line 75 of file vfs_hash.c.
References flags, vfs_hash_bucket(), vget_finish(), vget_prep(), and vput().
u_int vfs_hash_index | ( | struct vnode * | vp | ) |
Definition at line 61 of file vfs_hash.c.
int vfs_hash_insert | ( | struct vnode * | vp, |
u_int | hash, | ||
int | flags, | ||
struct thread * | td, | ||
struct vnode ** | vpp, | ||
vfs_hash_cmp_t * | fn, | ||
void * | arg | ||
) |
Definition at line 155 of file vfs_hash.c.
References flags, vfs_hash_bucket(), vget_finish(), vget_prep(), vgone(), and vput().
void vfs_hash_ref | ( | const struct mount * | mp, |
u_int | hash, | ||
struct thread * | td, | ||
struct vnode ** | vpp, | ||
vfs_hash_cmp_t * | fn, | ||
void * | arg | ||
) |
Definition at line 116 of file vfs_hash.c.
References vdrop(), vfs_hash_bucket(), vhold(), and vref().
void vfs_hash_rehash | ( | struct vnode * | vp, |
u_int | hash | ||
) |
Definition at line 197 of file vfs_hash.c.
References vfs_hash_bucket().
void vfs_hash_remove | ( | struct vnode * | vp | ) |
Definition at line 146 of file vfs_hash.c.