Changeset View
Changeset View
Standalone View
Standalone View
sys/kern/vfs_cache.c
Show First 20 Lines • Show All 573 Lines • ▼ Show 20 Lines | |||||
DEBUGNODE_ULONG(zap_bucket_fail, zap_bucket_fail, ""); | DEBUGNODE_ULONG(zap_bucket_fail, zap_bucket_fail, ""); | ||||
static long zap_bucket_fail2; | static long zap_bucket_fail2; | ||||
DEBUGNODE_ULONG(zap_bucket_fail2, zap_bucket_fail2, ""); | DEBUGNODE_ULONG(zap_bucket_fail2, zap_bucket_fail2, ""); | ||||
static long cache_lock_vnodes_cel_3_failures; | static long cache_lock_vnodes_cel_3_failures; | ||||
DEBUGNODE_ULONG(vnodes_cel_3_failures, cache_lock_vnodes_cel_3_failures, | DEBUGNODE_ULONG(vnodes_cel_3_failures, cache_lock_vnodes_cel_3_failures, | ||||
"Number of times 3-way vnode locking failed"); | "Number of times 3-way vnode locking failed"); | ||||
static void cache_zap_locked(struct namecache *ncp); | static void cache_zap_locked(struct namecache *ncp); | ||||
static int vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, | |||||
char **freebuf, size_t *buflen); | |||||
static int vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char *buf, | static int vn_fullpath_any_smr(struct vnode *vp, struct vnode *rdir, char *buf, | ||||
char **retbuf, size_t *buflen, size_t addend); | char **retbuf, size_t *buflen, size_t addend); | ||||
static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, | static int vn_fullpath_any(struct vnode *vp, struct vnode *rdir, char *buf, | ||||
char **retbuf, size_t *buflen); | char **retbuf, size_t *buflen); | ||||
static int vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, | static int vn_fullpath_dir(struct vnode *vp, struct vnode *rdir, char *buf, | ||||
char **retbuf, size_t *len, size_t addend); | char **retbuf, size_t *len, size_t addend); | ||||
static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); | static MALLOC_DEFINE(M_VFSCACHE, "vfscache", "VFS name cache entries"); | ||||
▲ Show 20 Lines • Show All 3,005 Lines • ▼ Show 20 Lines | |||||
* look up the target vnode with SAVENAME | WANTPARENT flags passed to namei. | * look up the target vnode with SAVENAME | WANTPARENT flags passed to namei. | ||||
* | * | ||||
* Then we have 2 cases: | * Then we have 2 cases: | ||||
* - if the found vnode is a directory, the path can be constructed just by | * - if the found vnode is a directory, the path can be constructed just by | ||||
* following names up the chain | * following names up the chain | ||||
* - otherwise we populate the buffer with the saved name and start resolving | * - otherwise we populate the buffer with the saved name and start resolving | ||||
* from the parent | * from the parent | ||||
*/ | */ | ||||
static int | int | ||||
vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, char **freebuf, | vn_fullpath_hardlink(struct nameidata *ndp, char **retbuf, char **freebuf, | ||||
size_t *buflen) | size_t *buflen) | ||||
{ | { | ||||
char *buf, *tmpbuf; | char *buf, *tmpbuf; | ||||
struct pwd *pwd; | struct pwd *pwd; | ||||
struct componentname *cnp; | struct componentname *cnp; | ||||
struct vnode *vp; | struct vnode *vp; | ||||
size_t addend; | size_t addend; | ||||
▲ Show 20 Lines • Show All 2,510 Lines • Show Last 20 Lines |