FreeBSD kernel kern code
vfs_cache.c File Reference
#include <sys/cdefs.h>
#include "opt_kdtrace.h"
#include "opt_ktrace.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/filedesc.h>
#include <sys/fnv_hash.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/fcntl.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/rwlock.h>
#include <sys/sdt.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysproto.h>
#include <sys/vnode.h>
#include <vm/uma.h>
Include dependency graph for vfs_cache.c:

Go to the source code of this file.

Data Structures

struct  namecache
 
struct  namecache_ts
 

Macros

#define NCF_WHITE   0x01
 
#define NCF_ISDOTDOT   0x02
 
#define NCF_TS   0x04
 
#define NCF_DTS   0x08
 
#define NCHHASH(hash)   (&nchashtbl[(hash) & nchash])
 
#define CACHE_UPGRADE_LOCK()   rw_try_upgrade(&cache_lock)
 
#define CACHE_RLOCK()   rw_rlock(&cache_lock)
 
#define CACHE_RUNLOCK()   rw_runlock(&cache_lock)
 
#define CACHE_WLOCK()   rw_wlock(&cache_lock)
 
#define CACHE_WUNLOCK()   rw_wunlock(&cache_lock)
 
#define CACHE_PATH_CUTOFF   35
 
#define STATNODE(mode, name, var, descr)   SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr);
 
#define STATNODE(name, descr)
 

Functions

 __FBSDID ("$BSDSUniX$")
 
 SDT_PROVIDER_DECLARE (vfs)
 
 SDT_PROBE_DEFINE3 (vfs, namecache, enter, done,"struct vnode *","char *","struct vnode *")
 
 SDT_PROBE_DEFINE2 (vfs, namecache, enter_negative, done,"struct vnode *","char *")
 
 SDT_PROBE_DEFINE1 (vfs, namecache, fullpath, entry,"struct vnode *")
 
 SDT_PROBE_DEFINE3 (vfs, namecache, fullpath, hit,"struct vnode *","char *","struct vnode *")
 
 SDT_PROBE_DEFINE1 (vfs, namecache, fullpath, miss,"struct vnode *")
 
 SDT_PROBE_DEFINE3 (vfs, namecache, fullpath, return,"int","struct vnode *","char *")
 
 SDT_PROBE_DEFINE3 (vfs, namecache, lookup, hit,"struct vnode *","char *","struct vnode *")
 
 SDT_PROBE_DEFINE2 (vfs, namecache, lookup, hit__negative,"struct vnode *","char *")
 
 SDT_PROBE_DEFINE2 (vfs, namecache, lookup, miss,"struct vnode *","char *")
 
 SDT_PROBE_DEFINE1 (vfs, namecache, purge, done,"struct vnode *")
 
 SDT_PROBE_DEFINE1 (vfs, namecache, purge_negative, done,"struct vnode *")
 
 SDT_PROBE_DEFINE1 (vfs, namecache, purgevfs, done,"struct mount *")
 
 SDT_PROBE_DEFINE3 (vfs, namecache, zap, done,"struct vnode *","char *","struct vnode *")
 
 SDT_PROBE_DEFINE2 (vfs, namecache, zap_negative, done,"struct vnode *","char *")
 
static LIST_HEAD (nchashhead, namecache)
 
static void cache_free (struct namecache *ncp)
 
static char * nc_get_name (struct namecache *ncp)
 
static void cache_out_ts (struct namecache *ncp, struct timespec *tsp, int *ticksp)
 
 SYSCTL_INT (_debug, OID_AUTO, vfscache, CTLFLAG_RW,&doingcache, 0,"VFS namecache enabled")
 
 SYSCTL_INT (_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, sizeof(struct namecache),"sizeof(struct namecache)")
 
static SYSCTL_NODE (_vfs, OID_AUTO, cache, CTLFLAG_RW, 0,"Name cache statistics")
 
 STATNODE (CTLFLAG_RD, numneg,&numneg,"Number of negative cache entries")
 
 STATNODE (CTLFLAG_RD, numcache,&numcache,"Number of cache entries")
 
 STATNODE (CTLFLAG_RD, numcalls,&numcalls,"Number of cache lookups")
 
 STATNODE (CTLFLAG_RD, dothits,&dothits,"Number of '.' hits")
 
 STATNODE (CTLFLAG_RD, dotdothits,&dotdothits,"Number of '..' hits")
 
 STATNODE (CTLFLAG_RD, numchecks,&numchecks,"Number of checks in lookup")
 
 STATNODE (CTLFLAG_RD, nummiss,&nummiss,"Number of cache misses")
 
 STATNODE (CTLFLAG_RD, nummisszap,&nummisszap,"Number of cache misses we do not want to cache")
 
 STATNODE (CTLFLAG_RD, numposzaps,&numposzaps,"Number of cache hits (positive) we do not want to cache")
 
 STATNODE (CTLFLAG_RD, numposhits,&numposhits,"Number of cache hits (positive)")
 
 STATNODE (CTLFLAG_RD, numnegzaps,&numnegzaps,"Number of cache hits (negative) we do not want to cache")
 
 STATNODE (CTLFLAG_RD, numneghits,&numneghits,"Number of cache hits (negative)")
 
 STATNODE (CTLFLAG_RD, numupgrades,&numupgrades,"Number of updates of the cache after lookup (write lock + retry)")
 
 SYSCTL_OPAQUE (_vfs_cache, OID_AUTO, nchstats, CTLFLAG_RD|CTLFLAG_MPSAFE,&nchstats, sizeof(nchstats),"LU","VFS cache effectiveness statistics")
 
static void cache_zap (struct namecache *ncp)
 
static int vn_vptocnp_locked (struct vnode **vp, struct ucred *cred, char *buf, u_int *buflen)
 
static int vn_fullpath1 (struct thread *td, struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, u_int buflen)
 
static MALLOC_DEFINE (M_VFSCACHE,"vfscache","VFS name cache entries")
 
int cache_lookup_times (struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp)
 
void cache_enter_time (struct vnode *dvp, struct vnode *vp, struct componentname *cnp, struct timespec *tsp, struct timespec *dtsp)
 
static void nchinit (void *dummy __unused)
 
 SYSINIT (vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL)
 
void cache_purge (struct vnode *vp)
 
void cache_purge_negative (struct vnode *vp)
 
void cache_purgevfs (struct mount *mp)
 
int vfs_cache_lookup (struct vop_lookup_args *ap)
 
 SYSCTL_INT (_debug, OID_AUTO, disablecwd, CTLFLAG_RW,&disablecwd, 0,"Disable the getcwd syscall")
 
int sys___getcwd (struct thread *td, struct __getcwd_args *uap)
 
int kern___getcwd (struct thread *td, char *buf, enum uio_seg bufseg, u_int buflen)
 
 SYSCTL_INT (_debug, OID_AUTO, disablefullpath, CTLFLAG_RW,&disablefullpath, 0,"Disable the vn_fullpath function")
 
 STATNODE (numfullpathcalls,"Number of fullpath search calls")
 
 STATNODE (numfullpathfail1,"Number of fullpath search errors (ENOTDIR)")
 
 STATNODE (numfullpathfail2,"Number of fullpath search errors (VOP_VPTOCNP failures)")
 
 STATNODE (numfullpathfail4,"Number of fullpath search errors (ENOMEM)")
 
 STATNODE (numfullpathfound,"Number of successful fullpath calls")
 
int vn_fullpath (struct thread *td, struct vnode *vn, char **retbuf, char **freebuf)
 
int vn_fullpath_global (struct thread *td, struct vnode *vn, char **retbuf, char **freebuf)
 
int vn_vptocnp (struct vnode **vp, struct ucred *cred, char *buf, u_int *buflen)
 
struct vnode * vn_dir_dd_ino (struct vnode *vp)
 
int vn_commname (struct vnode *vp, char *buf, u_int buflen)
 
void cache_enter (struct vnode *dvp, struct vnode *vp, struct componentname *cnp)
 
int cache_lookup (struct vnode *dvp, struct vnode **vpp, struct componentname *cnp)
 
int vn_path_to_global_path (struct thread *td, struct vnode *vp, char *path, u_int pathlen)
 

Variables

static int doingcache = 1
 
static u_long numcalls
 
static u_long dothits
 
static u_long dotdothits
 
static u_long numchecks
 
static u_long nummiss
 
static u_long nummisszap
 
static u_long numposzaps
 
static u_long numposhits
 
static u_long numnegzaps
 
static u_long numneghits
 
static u_long numupgrades
 
static int disablecwd
 
static int disablefullpath
 

Macro Definition Documentation

#define CACHE_PATH_CUTOFF   35

Referenced by cache_free(), LIST_HEAD(), and nchinit().

#define CACHE_RLOCK ( )    rw_rlock(&cache_lock)
#define CACHE_RUNLOCK ( )    rw_runlock(&cache_lock)
#define CACHE_UPGRADE_LOCK ( )    rw_try_upgrade(&cache_lock)

Referenced by cache_lookup_times().

#define CACHE_WLOCK ( )    rw_wlock(&cache_lock)
#define CACHE_WUNLOCK ( )    rw_wunlock(&cache_lock)
#define NCF_DTS   0x08

Definition at line 133 of file vfs_cache.c.

Referenced by cache_enter_time(), and cache_lookup_times().

#define NCF_ISDOTDOT   0x02
#define NCF_TS   0x04

Definition at line 132 of file vfs_cache.c.

Referenced by cache_enter_time(), cache_free(), cache_out_ts(), and nc_get_name().

#define NCF_WHITE   0x01

Definition at line 130 of file vfs_cache.c.

Referenced by cache_enter_time(), and cache_lookup_times().

#define NCHHASH (   hash)    (&nchashtbl[(hash) & nchash])

Definition at line 155 of file vfs_cache.c.

Referenced by cache_enter_time(), and cache_lookup_times().

#define STATNODE (   mode,
  name,
  var,
  descr 
)    SYSCTL_ULONG(_vfs_cache, OID_AUTO, name, mode, var, 0, descr);

Definition at line 1112 of file vfs_cache.c.

#define STATNODE (   name,
  descr 
)
Value:
static u_int name; \
SYSCTL_UINT(_vfs_cache, OID_AUTO, name, CTLFLAG_RD, &name, 0, descr)
const char * name
Definition: kern_fail.c:97
SYSCTL_UINT(_kern_eventtimer, OID_AUTO, idletick, CTLFLAG_RW,&idletick, 0,"Run periodic events when idle")

Definition at line 1112 of file vfs_cache.c.

Function Documentation

__FBSDID ( "$BSDSUniX$"  )
void cache_enter ( struct vnode *  dvp,
struct vnode *  vp,
struct componentname *  cnp 
)

Definition at line 1436 of file vfs_cache.c.

References cache_enter_time().

Referenced by mqfs_lookupx().

Here is the call graph for this function:

Here is the caller graph for this function:

void cache_enter_time ( struct vnode *  dvp,
struct vnode *  vp,
struct componentname *  cnp,
struct timespec *  tsp,
struct timespec *  dtsp 
)

Definition at line 705 of file vfs_cache.c.

References cache_free(), CACHE_WLOCK, CACHE_WUNLOCK, cache_zap(), desiredvnodes, flag, nc_get_name(), NCF_DTS, NCF_ISDOTDOT, NCF_TS, NCF_WHITE, NCHHASH, ticks, and vhold().

Referenced by cache_enter().

Here is the call graph for this function:

Here is the caller graph for this function:

static void cache_free ( struct namecache ncp)
static

Definition at line 220 of file vfs_cache.c.

References CACHE_PATH_CUTOFF, NCF_TS, and ts.

Referenced by cache_enter_time(), and cache_zap().

Here is the caller graph for this function:

int cache_lookup ( struct vnode *  dvp,
struct vnode **  vpp,
struct componentname *  cnp 
)

Definition at line 1443 of file vfs_cache.c.

References cache_lookup_times().

Referenced by vfs_cache_lookup().

Here is the call graph for this function:

Here is the caller graph for this function:

int cache_lookup_times ( struct vnode *  dvp,
struct vnode **  vpp,
struct componentname *  cnp,
struct timespec *  tsp,
int *  ticksp 
)

Definition at line 472 of file vfs_cache.c.

References cache_out_ts(), CACHE_RLOCK, CACHE_RUNLOCK, CACHE_UPGRADE_LOCK, CACHE_WLOCK, CACHE_WUNLOCK, cache_zap(), lookup(), nc_get_name(), NCF_DTS, NCF_ISDOTDOT, NCF_WHITE, NCHHASH, ticks, vget(), vput(), and vrele().

Referenced by cache_lookup().

Here is the call graph for this function:

Here is the caller graph for this function:

static void cache_out_ts ( struct namecache ncp,
struct timespec *  tsp,
int *  ticksp 
)
static

Definition at line 250 of file vfs_cache.c.

References NCF_TS.

Referenced by cache_lookup_times().

Here is the caller graph for this function:

void cache_purge ( struct vnode *  vp)

Definition at line 941 of file vfs_cache.c.

References CACHE_WLOCK, CACHE_WUNLOCK, cache_zap(), and NCF_ISDOTDOT.

Referenced by do_unlink(), vfs_domount_first(), vfs_mountroot_shuffle(), and vgonel().

Here is the call graph for this function:

Here is the caller graph for this function:

void cache_purge_negative ( struct vnode *  vp)

Definition at line 965 of file vfs_cache.c.

References CACHE_WLOCK, CACHE_WUNLOCK, and cache_zap().

Here is the call graph for this function:

void cache_purgevfs ( struct mount *  mp)

Definition at line 984 of file vfs_cache.c.

References CACHE_WLOCK, CACHE_WUNLOCK, and cache_zap().

Referenced by dounmount(), and vfs_mountroot_shuffle().

Here is the call graph for this function:

Here is the caller graph for this function:

static void cache_zap ( struct namecache ncp)
static

Definition at line 412 of file vfs_cache.c.

References cache_free(), nc_get_name(), NCF_ISDOTDOT, and vdrop().

Referenced by cache_enter_time(), cache_lookup_times(), cache_purge(), cache_purge_negative(), and cache_purgevfs().

Here is the call graph for this function:

Here is the caller graph for this function:

int kern___getcwd ( struct thread *  td,
char *  buf,
enum uio_seg  bufseg,
u_int  buflen 
)

Definition at line 1063 of file vfs_cache.c.

References free(), malloc(), vn_fullpath1(), and vrele().

Referenced by sys___getcwd().

Here is the call graph for this function:

Here is the caller graph for this function:

static LIST_HEAD ( nchashhead  ,
namecache   
)
static

Definition at line 157 of file vfs_cache.c.

References CACHE_PATH_CUTOFF.

static MALLOC_DEFINE ( M_VFSCACHE  ,
"vfscache"  ,
"VFS name cache entries"   
)
static
static char* nc_get_name ( struct namecache ncp)
static

Definition at line 239 of file vfs_cache.c.

References NCF_TS.

Referenced by cache_enter_time(), cache_lookup_times(), cache_zap(), vn_commname(), and vn_vptocnp_locked().

Here is the caller graph for this function:

static void nchinit ( void *dummy  __unused)
static

Definition at line 914 of file vfs_cache.c.

References CACHE_PATH_CUTOFF, desiredvnodes, and hashinit().

Here is the call graph for this function:

SDT_PROBE_DEFINE1 ( vfs  ,
namecache  ,
fullpath  ,
entry  ,
"struct vnode *"   
)
SDT_PROBE_DEFINE1 ( vfs  ,
namecache  ,
fullpath  ,
miss  ,
"struct vnode *"   
)
SDT_PROBE_DEFINE1 ( vfs  ,
namecache  ,
purge  ,
done  ,
"struct vnode *"   
)
SDT_PROBE_DEFINE1 ( vfs  ,
namecache  ,
purge_negative  ,
done  ,
"struct vnode *"   
)
SDT_PROBE_DEFINE1 ( vfs  ,
namecache  ,
purgevfs  ,
done  ,
"struct mount *"   
)
SDT_PROBE_DEFINE2 ( vfs  ,
namecache  ,
enter_negative  ,
done  ,
"struct vnode *"  ,
"char *"   
)
SDT_PROBE_DEFINE2 ( vfs  ,
namecache  ,
lookup  ,
hit__negative  ,
"struct vnode *"  ,
"char *"   
)
SDT_PROBE_DEFINE2 ( vfs  ,
namecache  ,
lookup  ,
miss  ,
"struct vnode *"  ,
"char *"   
)
SDT_PROBE_DEFINE2 ( vfs  ,
namecache  ,
zap_negative  ,
done  ,
"struct vnode *"  ,
"char *"   
)
SDT_PROBE_DEFINE3 ( vfs  ,
namecache  ,
enter  ,
done  ,
"struct vnode *"  ,
"char *"  ,
"struct vnode *"   
)
SDT_PROBE_DEFINE3 ( vfs  ,
namecache  ,
fullpath  ,
hit  ,
"struct vnode *"  ,
"char *"  ,
"struct vnode *"   
)
SDT_PROBE_DEFINE3 ( vfs  ,
namecache  ,
fullpath  ,
return  ,
"int"  ,
"struct vnode *"  ,
"char *"   
)
SDT_PROBE_DEFINE3 ( vfs  ,
namecache  ,
lookup  ,
hit  ,
"struct vnode *"  ,
"char *"  ,
"struct vnode *"   
)
SDT_PROBE_DEFINE3 ( vfs  ,
namecache  ,
zap  ,
done  ,
"struct vnode *"  ,
"char *"  ,
"struct vnode *"   
)
SDT_PROVIDER_DECLARE ( vfs  )
STATNODE ( CTLFLAG_RD  ,
numneg  ,
numneg,
"Number of negative cache entries"   
)
STATNODE ( CTLFLAG_RD  ,
numcache  ,
numcache,
"Number of cache entries"   
)
STATNODE ( CTLFLAG_RD  ,
numcalls  ,
numcalls,
"Number of cache lookups"   
)
STATNODE ( CTLFLAG_RD  ,
dothits  ,
dothits,
"Number of '.' hits"   
)
STATNODE ( CTLFLAG_RD  ,
dotdothits  ,
dotdothits,
"Number of '..' hits"   
)
STATNODE ( CTLFLAG_RD  ,
numchecks  ,
numchecks,
"Number of checks in lookup  
)
STATNODE ( CTLFLAG_RD  ,
nummiss  ,
nummiss,
"Number of cache misses"   
)
STATNODE ( CTLFLAG_RD  ,
nummisszap  ,
nummisszap,
"Number of cache misses we do not want to cache"   
)
STATNODE ( CTLFLAG_RD  ,
numposzaps  ,
numposzaps,
"Number of cache hits (positive) we do not want to cache"   
)
STATNODE ( CTLFLAG_RD  ,
numposhits  ,
numposhits,
"Number of cache hits (positive)"   
)
STATNODE ( CTLFLAG_RD  ,
numnegzaps  ,
numnegzaps,
"Number of cache hits (negative) we do not want to cache"   
)
STATNODE ( CTLFLAG_RD  ,
numneghits  ,
numneghits,
"Number of cache hits (negative)"   
)
STATNODE ( CTLFLAG_RD  ,
numupgrades  ,
numupgrades,
"Number of updates of the cache after lookup (write lock + retry)"   
)
STATNODE ( numfullpathcalls  ,
"Number of fullpath search calls"   
)
STATNODE ( numfullpathfail1  ,
"Number of fullpath search errors (ENOTDIR)"   
)
STATNODE ( numfullpathfail2  ,
"Number of fullpath search errors (VOP_VPTOCNP failures)"   
)
STATNODE ( numfullpathfail4  ,
"Number of fullpath search errors (ENOMEM)"   
)
STATNODE ( numfullpathfound  ,
"Number of successful fullpath calls"   
)
int sys___getcwd ( struct thread *  td,
struct __getcwd_args *  uap 
)

Definition at line 1054 of file vfs_cache.c.

References kern___getcwd().

Here is the call graph for this function:

SYSCTL_INT ( _debug  ,
OID_AUTO  ,
vfscache  ,
CTLFLAG_RW  ,
doingcache,
,
"VFS namecache enabled"   
)
SYSCTL_INT ( _debug_sizeof  ,
OID_AUTO  ,
namecache  ,
CTLFLAG_RD  ,
SYSCTL_NULL_INT_PTR  ,
sizeof(struct namecache ,
"sizeof(struct namecache)"   
)
SYSCTL_INT ( _debug  ,
OID_AUTO  ,
disablecwd  ,
CTLFLAG_RW  ,
disablecwd,
,
"Disable the getcwd syscall"   
)
SYSCTL_INT ( _debug  ,
OID_AUTO  ,
disablefullpath  ,
CTLFLAG_RW  ,
disablefullpath,
,
"Disable the vn_fullpath function"   
)
static SYSCTL_NODE ( _vfs  ,
OID_AUTO  ,
cache  ,
CTLFLAG_RW  ,
,
"Name cache statistics"   
)
static
SYSCTL_OPAQUE ( _vfs_cache  ,
OID_AUTO  ,
nchstats  ,
CTLFLAG_RD|  CTLFLAG_MPSAFE,
nchstats,
sizeof(nchstats)  ,
"LU"  ,
"VFS cache effectiveness statistics"   
)
SYSINIT ( vfs  ,
SI_SUB_VFS  ,
SI_ORDER_SECOND  ,
nchinit  ,
NULL   
)
int vfs_cache_lookup ( struct vop_lookup_args *  ap)

Definition at line 1008 of file vfs_cache.c.

References cache_lookup().

Here is the call graph for this function:

int vn_commname ( struct vnode *  vp,
char *  buf,
u_int  buflen 
)

Definition at line 1406 of file vfs_cache.c.

References CACHE_RLOCK, CACHE_RUNLOCK, nc_get_name(), and NCF_ISDOTDOT.

Referenced by do_execve().

Here is the call graph for this function:

Here is the caller graph for this function:

struct vnode* vn_dir_dd_ino ( struct vnode *  vp)

Definition at line 1384 of file vfs_cache.c.

References CACHE_RLOCK, CACHE_RUNLOCK, NCF_ISDOTDOT, and vget().

Here is the call graph for this function:

int vn_fullpath ( struct thread *  td,
struct vnode *  vn,
char **  retbuf,
char **  freebuf 
)

Definition at line 1133 of file vfs_cache.c.

References buf, free(), malloc(), vn_fullpath1(), and vrele().

Referenced by do_execve(), fill_vnode_info(), kern_proc_vmmap_out(), ptrace_vm_entry(), and sysctl_kern_proc_pathname().

Here is the call graph for this function:

Here is the caller graph for this function:

static int vn_fullpath1 ( struct thread *  td,
struct vnode *  vp,
struct vnode *  rdir,
char *  buf,
char **  retbuf,
u_int  buflen 
)
static

Definition at line 1276 of file vfs_cache.c.

References CACHE_RLOCK, CACHE_RUNLOCK, rootvnode, vn_vptocnp_locked(), vref(), and vrele().

Referenced by kern___getcwd(), vn_fullpath(), and vn_fullpath_global().

Here is the call graph for this function:

Here is the caller graph for this function:

int vn_fullpath_global ( struct thread *  td,
struct vnode *  vn,
char **  retbuf,
char **  freebuf 
)

Definition at line 1170 of file vfs_cache.c.

References buf, free(), malloc(), rootvnode, and vn_fullpath1().

Referenced by vn_path_to_global_path().

Here is the call graph for this function:

Here is the caller graph for this function:

int vn_path_to_global_path ( struct thread *  td,
struct vnode *  vp,
char *  path,
u_int  pathlen 
)

Definition at line 1463 of file vfs_cache.c.

References free(), namei(), NDFREE(), vn_fullpath_global(), vput(), and vrele().

Referenced by kern_jail_set(), sys_unmount(), and vfs_domount().

Here is the call graph for this function:

Here is the caller graph for this function:

int vn_vptocnp ( struct vnode **  vp,
struct ucred *  cred,
char *  buf,
u_int *  buflen 
)

Definition at line 1190 of file vfs_cache.c.

References CACHE_RLOCK, CACHE_RUNLOCK, and vn_vptocnp_locked().

Here is the call graph for this function:

static int vn_vptocnp_locked ( struct vnode **  vp,
struct ucred *  cred,
char *  buf,
u_int *  buflen 
)
static

Definition at line 1202 of file vfs_cache.c.

References CACHE_RLOCK, CACHE_RUNLOCK, nc_get_name(), NCF_ISDOTDOT, vput(), vref(), and vrele().

Referenced by vn_fullpath1(), and vn_vptocnp().

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

int disablecwd
static

Definition at line 1048 of file vfs_cache.c.

int disablefullpath
static

Definition at line 1116 of file vfs_cache.c.

int doingcache = 1
static

Definition at line 263 of file vfs_cache.c.

u_long dotdothits
static

Definition at line 284 of file vfs_cache.c.

u_long dothits
static

Definition at line 282 of file vfs_cache.c.

u_long numcalls
static

Definition at line 280 of file vfs_cache.c.

u_long numchecks
static

Definition at line 286 of file vfs_cache.c.

u_long nummiss
static

Definition at line 288 of file vfs_cache.c.

u_long nummisszap
static

Definition at line 290 of file vfs_cache.c.

u_long numneghits
static

Definition at line 298 of file vfs_cache.c.

u_long numnegzaps
static

Definition at line 296 of file vfs_cache.c.

u_long numposhits
static

Definition at line 294 of file vfs_cache.c.

u_long numposzaps
static

Definition at line 292 of file vfs_cache.c.

u_long numupgrades
static

Definition at line 300 of file vfs_cache.c.