FreeBSD kernel kern code
|
#include <sys/cdefs.h>
#include "opt_ddb.h"
#include "opt_ktrace.h"
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/capsicum.h>
#include <sys/counter.h>
#include <sys/filedesc.h>
#include <sys/fnv_hash.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/fcntl.h>
#include <sys/jail.h>
#include <sys/mount.h>
#include <sys/namei.h>
#include <sys/proc.h>
#include <sys/seqc.h>
#include <sys/sdt.h>
#include <sys/smr.h>
#include <sys/smp.h>
#include <sys/syscallsubr.h>
#include <sys/sysctl.h>
#include <sys/sysproto.h>
#include <sys/vnode.h>
#include <ck_queue.h>
#include <security/audit/audit.h>
#include <security/mac/mac_framework.h>
#include <vm/uma.h>
Go to the source code of this file.
Data Structures | |
struct | negstate |
struct | namecache |
struct | namecache_ts |
struct | celockstate |
struct | nameidata_outer |
struct | nameidata_saved |
struct | cache_fpl |
Macros | |
#define | CACHE_ZONE_ALIGNMENT UMA_ALIGNOF(time_t) |
#define | CACHE_PATH_CUTOFF 41 |
#define | CACHE_LARGE_PAD 2 |
#define | CACHE_ZONE_SMALL_SIZE (offsetof(struct namecache, nc_name) + CACHE_PATH_CUTOFF + 1) |
#define | CACHE_ZONE_SMALL_TS_SIZE (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_SMALL_SIZE) |
#define | CACHE_ZONE_LARGE_SIZE (offsetof(struct namecache, nc_name) + NAME_MAX + 1 + CACHE_LARGE_PAD) |
#define | CACHE_ZONE_LARGE_TS_SIZE (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_LARGE_SIZE) |
#define | nc_vp n_un.nu_vp |
#define | nc_neg n_un.nu_neg |
#define | NCF_WHITE 0x01 |
#define | NCF_ISDOTDOT 0x02 |
#define | NCF_TS 0x04 |
#define | NCF_DTS 0x08 |
#define | NCF_DVDROP 0x10 |
#define | NCF_NEGATIVE 0x20 |
#define | NCF_INVALID 0x40 |
#define | NCF_WIP 0x80 |
#define | NEG_HOT 0x01 |
#define | cache_ncp_canuse(ncp) |
#define | cache_fpl_neg_ncp_canuse(ncp) |
#define | NCHHASH(hash) (&nchashtbl[(hash) & nchash]) |
#define | ncneghash 3 |
#define | numneglists (ncneghash + 1) |
#define | numbucketlocks (ncbuckethash + 1) |
#define | HASH2BUCKETLOCK(hash) ((struct mtx *)(&bucketlocks[((hash) & ncbuckethash)])) |
#define | numvnodelocks (ncvnodehash + 1) |
#define | STATNODE_ULONG(name, varname, descr) SYSCTL_ULONG(_vfs_cache_stats, OID_AUTO, name, CTLFLAG_RD, &varname, 0, descr); |
#define | STATNODE_COUNTER(name, varname, descr) |
#define | DEBUGNODE_ULONG(name, varname, descr) SYSCTL_ULONG(_vfs_cache_debug, OID_AUTO, name, CTLFLAG_RD, &varname, 0, descr); |
#define | DEBUGNODE_COUNTER(name, varname, descr) |
#define | cache_assert_bucket_locked(x) do { } while (0) |
#define | cache_assert_bucket_unlocked(x) do { } while (0) |
#define | cache_sort_vnodes(x, y) _cache_sort_vnodes((void **)(x), (void **)(y)) |
#define | CACHE_NEG_PROMOTION_THRESH 2 |
#define | cache_neg_hit_abort(ncp) do { } while (0) |
#define | cache_rev_failed(var) cache_rev_failed_impl((var), __LINE__) |
#define | CACHE_FPL_FAILED -2020 |
#define | cache_fpl_smr_assert_entered(fpl) do { } while (0) |
#define | cache_fpl_smr_assert_not_entered(fpl) do { } while (0) |
#define | cache_fpl_assert_status(fpl) do { } while (0) |
#define | cache_fpl_smr_enter_initial(fpl) |
#define | cache_fpl_smr_enter(fpl) |
#define | cache_fpl_smr_exit(fpl) |
#define | cache_fpl_aborted_early(x) cache_fpl_aborted_early_impl((x), __LINE__) |
#define | cache_fpl_aborted(x) cache_fpl_aborted_impl((x), __LINE__) |
#define | cache_fpl_partial(x) cache_fpl_partial_impl((x), __LINE__) |
#define | cache_fpl_handled(x) cache_fpl_handled_impl((x), __LINE__) |
#define | cache_fpl_handled_error(x, e) cache_fpl_handled_error_impl((x), (e), __LINE__) |
#define | CACHE_FPL_SUPPORTED_CN_FLAGS |
#define | CACHE_FPL_INTERNAL_CN_FLAGS (ISDOTDOT | MAKEENTRY | ISLASTCN) |
Functions | |
__FBSDID ("$FreeBSD$") | |
static | SYSCTL_NODE (_vfs, OID_AUTO, cache, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "Name cache") |
SDT_PROVIDER_DECLARE (vfs) | |
SDT_PROBE_DEFINE3 (vfs, namecache, enter, done, "struct vnode *", "char *", "struct vnode *") | |
SDT_PROBE_DEFINE3 (vfs, namecache, enter, duplicate, "struct vnode *", "char *", "struct vnode *") | |
SDT_PROBE_DEFINE2 (vfs, namecache, enter_negative, done, "struct vnode *", "char *") | |
SDT_PROBE_DEFINE2 (vfs, namecache, fullpath_smr, hit, "struct vnode *", "const char *") | |
SDT_PROBE_DEFINE4 (vfs, namecache, fullpath_smr, miss, "struct vnode *", "struct namecache *", "int", "int") | |
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_DEFINE2 (vfs, namecache, removecnp, hit, "struct vnode *", "struct componentname *") | |
SDT_PROBE_DEFINE2 (vfs, namecache, removecnp, miss, "struct vnode *", "struct componentname *") | |
SDT_PROBE_DEFINE3 (vfs, namecache, purge, done, "struct vnode *", "size_t", "size_t") | |
SDT_PROBE_DEFINE1 (vfs, namecache, purge, batch, "int") | |
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 *") | |
SDT_PROBE_DEFINE2 (vfs, namecache, evict_negative, done, "struct vnode *", "char *") | |
SDT_PROBE_DEFINE1 (vfs, namecache, symlink, alloc__fail, "size_t") | |
SDT_PROBE_DEFINE3 (vfs, fplookup, lookup, done, "struct nameidata", "int", "bool") | |
SDT_PROBE_DECLARE (vfs, namei, lookup, entry) | |
SDT_PROBE_DECLARE (vfs, namei, lookup, return) | |
_Static_assert (sizeof(struct negstate)<=sizeof(struct vnode *), "the state must fit in a union with a pointer without growing it") | |
TAILQ_HEAD (cache_freebatch, namecache) | |
_Static_assert ((CACHE_ZONE_SMALL_SIZE %(CACHE_ZONE_ALIGNMENT+1))==0, "bad zone size") | |
_Static_assert ((CACHE_ZONE_SMALL_TS_SIZE %(CACHE_ZONE_ALIGNMENT+1))==0, "bad zone size") | |
_Static_assert ((CACHE_ZONE_LARGE_SIZE %(CACHE_ZONE_ALIGNMENT+1))==0, "bad zone size") | |
_Static_assert ((CACHE_ZONE_LARGE_TS_SIZE %(CACHE_ZONE_ALIGNMENT+1))==0, "bad zone size") | |
static bool | cache_neg_evict_cond (u_long lnumcache) |
static void | cache_ncp_invalidate (struct namecache *ncp) |
static | SYSCTL_NODE (_vfs_cache, OID_AUTO, param, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "Name cache parameters") |
SYSCTL_UINT (_vfs_cache_param, OID_AUTO, size, CTLFLAG_RW, &ncsize, 0, "Total namecache capacity") | |
SYSCTL_UINT (_vfs_cache_param, OID_AUTO, sizefactor, CTLFLAG_RW, &ncsizefactor, 0, "Size factor for namecache") | |
SYSCTL_ULONG (_vfs_cache_param, OID_AUTO, negfactor, CTLFLAG_RW, &ncnegfactor, 0, "Ratio of negative namecache entries") | |
SYSCTL_UINT (_vfs_cache_param, OID_AUTO, negmin, CTLFLAG_RD, &neg_min, 0, "Negative entry count above which automatic eviction is allowed") | |
static __read_mostly | CK_SLIST_HEAD (nchashhead, namecache) |
__aligned (CACHE_LINE_SIZE) | |
static struct neglist * | NCP2NEGLIST (struct namecache *ncp) |
static struct negstate * | NCP2NEGSTATE (struct namecache *ncp) |
static struct mtx * | VP2VNODELOCK (struct vnode *vp) |
static void | cache_out_ts (struct namecache *ncp, struct timespec *tsp, int *ticksp) |
SYSCTL_INT (_debug_sizeof, OID_AUTO, namecache, CTLFLAG_RD, SYSCTL_NULL_INT_PTR, sizeof(struct namecache), "sizeof(struct namecache)") | |
static | SYSCTL_NODE (_vfs_cache, OID_AUTO, stats, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "Name cache statistics") |
STATNODE_ULONG (neg, numneg, "Number of negative cache entries") | |
STATNODE_ULONG (count, numcache, "Number of cache entries") | |
STATNODE_COUNTER (heldvnodes, numcachehv, "Number of namecache entries with vnodes held") | |
STATNODE_COUNTER (drops, numdrops, "Number of dropped entries due to reaching the limit") | |
STATNODE_COUNTER (dothits, dothits, "Number of '.' hits") | |
STATNODE_COUNTER (dotdothis, dotdothits, "Number of '..' hits") | |
STATNODE_COUNTER (miss, nummiss, "Number of cache misses") | |
STATNODE_COUNTER (misszap, nummisszap, "Number of cache misses we do not want to cache") | |
STATNODE_COUNTER (posszaps, numposzaps, "Number of cache hits (positive) we do not want to cache") | |
STATNODE_COUNTER (poshits, numposhits, "Number of cache hits (positive)") | |
STATNODE_COUNTER (negzaps, numnegzaps, "Number of cache hits (negative) we do not want to cache") | |
STATNODE_COUNTER (neghits, numneghits, "Number of cache hits (negative)") | |
STATNODE_COUNTER (fullpathcalls, numfullpathcalls, "Number of fullpath search calls") | |
STATNODE_COUNTER (fullpathfail1, numfullpathfail1, "Number of fullpath search errors (ENOTDIR)") | |
STATNODE_COUNTER (fullpathfail2, numfullpathfail2, "Number of fullpath search errors (VOP_VPTOCNP failures)") | |
STATNODE_COUNTER (fullpathfail4, numfullpathfail4, "Number of fullpath search errors (ENOMEM)") | |
STATNODE_COUNTER (fullpathfound, numfullpathfound, "Number of successful fullpath calls") | |
STATNODE_COUNTER (symlinktoobig, symlinktoobig, "Number of times symlink did not fit the cache") | |
static | SYSCTL_NODE (_vfs_cache, OID_AUTO, debug, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "Name cache debugging") |
DEBUGNODE_COUNTER (zap_bucket_relock_success, zap_bucket_relock_success, "Number of successful removals after relocking") | |
DEBUGNODE_ULONG (zap_bucket_fail, zap_bucket_fail, "") | |
DEBUGNODE_ULONG (zap_bucket_fail2, zap_bucket_fail2, "") | |
DEBUGNODE_ULONG (vnodes_cel_3_failures, cache_lock_vnodes_cel_3_failures, "Number of times 3-way vnode locking failed") | |
static void | cache_zap_locked (struct namecache *ncp) |
static int | vn_fullpath_any_smr (struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, size_t *buflen, size_t addend) |
static int | vn_fullpath_any (struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, size_t *buflen) |
static int | vn_fullpath_dir (struct vnode *vp, struct vnode *rdir, char *buf, char **retbuf, size_t *len, size_t addend) |
static | MALLOC_DEFINE (M_VFSCACHE, "vfscache", "VFS name cache entries") |
static void | cache_assert_vlp_locked (struct mtx *vlp) |
static void | cache_assert_vnode_locked (struct vnode *vp) |
static void | cache_hold_vnode (struct vnode *vp) |
static void | cache_drop_vnode (struct vnode *vp) |
char * | cache_symlink_alloc (size_t size, int flags) |
void | cache_symlink_free (char *string, size_t size) |
static struct namecache * | cache_alloc_uma (int len, bool ts) |
static void | cache_free_uma (struct namecache *ncp) |
static struct namecache * | cache_alloc (int len, bool ts) |
static void | cache_free (struct namecache *ncp) |
static void | cache_free_batch (struct cache_freebatch *batch) |
static void | cache_prehash (struct vnode *vp) |
static uint32_t | cache_get_hash (char *name, u_char len, struct vnode *dvp) |
static uint32_t | cache_get_hash_iter_start (struct vnode *dvp) |
static uint32_t | cache_get_hash_iter (char c, uint32_t hash) |
static uint32_t | cache_get_hash_iter_finish (uint32_t hash) |
static struct nchashhead * | NCP2BUCKET (struct namecache *ncp) |
static struct mtx * | NCP2BUCKETLOCK (struct namecache *ncp) |
static void | _cache_sort_vnodes (void **p1, void **p2) |
static void | cache_lock_all_buckets (void) |
static void | cache_unlock_all_buckets (void) |
static void | cache_lock_all_vnodes (void) |
static void | cache_unlock_all_vnodes (void) |
static int | cache_trylock_vnodes (struct mtx *vlp1, struct mtx *vlp2) |
static void | cache_lock_vnodes (struct mtx *vlp1, struct mtx *vlp2) |
static void | cache_unlock_vnodes (struct mtx *vlp1, struct mtx *vlp2) |
static int | sysctl_nchstats (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_vfs_cache, OID_AUTO, nchstats, CTLTYPE_OPAQUE|CTLFLAG_RD|CTLFLAG_MPSAFE, 0, 0, sysctl_nchstats, "LU", "VFS cache effectiveness statistics") | |
static void | cache_recalc_neg_min (u_int val) |
static int | sysctl_negminpct (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_vfs_cache_param, OID_AUTO, negminpct, CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_RW, NULL, 0, sysctl_negminpct, "I", "Negative entry \% of namecache capacity above which automatic eviction is allowed") | |
static | SYSCTL_NODE (_vfs_cache, OID_AUTO, neg, CTLFLAG_RW|CTLFLAG_MPSAFE, 0, "Name cache negative entry statistics") |
SYSCTL_ULONG (_vfs_cache_neg, OID_AUTO, count, CTLFLAG_RD, &numneg, 0, "Number of negative cache entries") | |
static | COUNTER_U64_DEFINE_EARLY (neg_created) |
SYSCTL_COUNTER_U64 (_vfs_cache_neg, OID_AUTO, created, CTLFLAG_RD, &neg_created, "Number of created negative entries") | |
static | COUNTER_U64_DEFINE_EARLY (neg_evicted) |
SYSCTL_COUNTER_U64 (_vfs_cache_neg, OID_AUTO, evicted, CTLFLAG_RD, &neg_evicted, "Number of evicted negative entries") | |
static | COUNTER_U64_DEFINE_EARLY (neg_evict_skipped_empty) |
SYSCTL_COUNTER_U64 (_vfs_cache_neg, OID_AUTO, evict_skipped_empty, CTLFLAG_RD, &neg_evict_skipped_empty, "Number of times evicting failed due to lack of entries") | |
static | COUNTER_U64_DEFINE_EARLY (neg_evict_skipped_missed) |
SYSCTL_COUNTER_U64 (_vfs_cache_neg, OID_AUTO, evict_skipped_missed, CTLFLAG_RD, &neg_evict_skipped_missed, "Number of times evicting failed due to target entry disappearing") | |
static | COUNTER_U64_DEFINE_EARLY (neg_evict_skipped_contended) |
SYSCTL_COUNTER_U64 (_vfs_cache_neg, OID_AUTO, evict_skipped_contended, CTLFLAG_RD, &neg_evict_skipped_contended, "Number of times evicting failed due to contention") | |
SYSCTL_COUNTER_U64 (_vfs_cache_neg, OID_AUTO, hits, CTLFLAG_RD, &numneghits, "Number of cache hits (negative)") | |
static int | sysctl_neg_hot (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_vfs_cache_neg, OID_AUTO, hot, CTLTYPE_INT|CTLFLAG_RD|CTLFLAG_MPSAFE, 0, 0, sysctl_neg_hot, "I", "Number of hot negative entries") | |
static void | cache_neg_init (struct namecache *ncp) |
static bool | cache_neg_hit_prep (struct namecache *ncp) |
static void | cache_neg_hit_finish (struct namecache *ncp) |
static void | cache_neg_promote_locked (struct namecache *ncp) |
static void | cache_neg_demote_locked (struct namecache *ncp) |
static bool | cache_neg_promote_cond (struct vnode *dvp, struct componentname *cnp, struct namecache *oncp, uint32_t hash) |
static void | cache_neg_promote (struct namecache *ncp) |
static void | cache_neg_insert (struct namecache *ncp) |
static void | cache_neg_remove (struct namecache *ncp) |
static struct neglist * | cache_neg_evict_select_list (void) |
static struct namecache * | cache_neg_evict_select_entry (struct neglist *nl) |
static bool | cache_neg_evict (void) |
static void | cache_zap_negative_locked_vnode_kl (struct namecache *ncp, struct vnode *vp) |
static bool | cache_zap_locked_vnode_kl2 (struct namecache *ncp, struct vnode *vp, struct mtx **vlpp) |
static int | cache_zap_unlocked_bucket (struct namecache *ncp, struct componentname *cnp, struct vnode *dvp, struct mtx *dvlp, struct mtx *vlp, uint32_t hash, struct mtx *blp) |
static int __noinline | cache_zap_locked_bucket (struct namecache *ncp, struct componentname *cnp, uint32_t hash, struct mtx *blp) |
static __noinline int | cache_remove_cnp (struct vnode *dvp, struct componentname *cnp) |
static int __noinline | cache_lookup_dot (struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) |
static int __noinline | cache_lookup_dotdot (struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) |
static int __noinline | cache_lookup_fallback (struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) |
int | cache_lookup (struct vnode *dvp, struct vnode **vpp, struct componentname *cnp, struct timespec *tsp, int *ticksp) |
CTASSERT ((nitems(((struct celockstate *) 0) ->vlp)==3)) | |
CTASSERT ((nitems(((struct celockstate *) 0) ->blp)==2)) | |
static void | cache_celockstate_init (struct celockstate *cel) |
static void | cache_lock_vnodes_cel (struct celockstate *cel, struct vnode *vp, struct vnode *dvp) |
static void | cache_unlock_vnodes_cel (struct celockstate *cel) |
static bool | cache_lock_vnodes_cel_3 (struct celockstate *cel, struct vnode *vp) |
static void | cache_lock_buckets_cel (struct celockstate *cel, struct mtx *blp1, struct mtx *blp2) |
static void | cache_unlock_buckets_cel (struct celockstate *cel) |
static void | cache_enter_lock (struct celockstate *cel, struct vnode *dvp, struct vnode *vp, uint32_t hash) |
static void | cache_enter_lock_dd (struct celockstate *cel, struct vnode *dvp, struct vnode *vp, uint32_t hash) |
static void | cache_enter_unlock (struct celockstate *cel) |
static void __noinline | cache_enter_dotdot_prep (struct vnode *dvp, struct vnode *vp, struct componentname *cnp) |
void | cache_enter_time (struct vnode *dvp, struct vnode *vp, struct componentname *cnp, struct timespec *tsp, struct timespec *dtsp) |
void | cache_enter_time_flags (struct vnode *dvp, struct vnode *vp, struct componentname *cnp, struct timespec *tsp, struct timespec *dtsp, int flags) |
static u_int | cache_roundup_2 (u_int val) |
static struct nchashhead * | nchinittbl (u_long elements, u_long *hashmask) |
static void | ncfreetbl (struct nchashhead *hashtbl) |
static void | nchinit (void *dummy __unused) |
SYSINIT (vfs, SI_SUB_VFS, SI_ORDER_SECOND, nchinit, NULL) | |
void | cache_vnode_init (struct vnode *vp) |
static void | cache_changesize_set_temp (struct nchashhead *temptbl, u_long temphash) |
static void | cache_changesize_set_new (struct nchashhead *new_tbl, u_long new_hash) |
void | cache_changesize (u_long newmaxvnodes) |
static void | cache_purge_impl (struct vnode *vp) |
static bool | cache_has_entries (struct vnode *vp) |
void | cache_purge (struct vnode *vp) |
void | cache_purge_vgone (struct vnode *vp) |
void | cache_purge_negative (struct vnode *vp) |
void | cache_vop_rename (struct vnode *fdvp, struct vnode *fvp, struct vnode *tdvp, struct vnode *tvp, struct componentname *fcnp, struct componentname *tcnp) |
void | cache_vop_rmdir (struct vnode *dvp, struct vnode *vp) |
void | cache_purgevfs (struct mount *mp) |
int | vfs_cache_lookup (struct vop_lookup_args *ap) |
int | sys___getcwd (struct thread *td, struct __getcwd_args *uap) |
int | vn_getcwd (char *buf, char **retbuf, size_t *buflen) |
static int | kern___realpathat (struct thread *td, int fd, const char *path, char *buf, size_t size, int flags, enum uio_seg pathseg) |
int | sys___realpathat (struct thread *td, struct __realpathat_args *uap) |
int | vn_fullpath (struct vnode *vp, char **retbuf, char **freebuf) |
int | vn_fullpath_global (struct vnode *vp, char **retbuf, char **freebuf) |
static struct namecache * | vn_dd_from_dst (struct vnode *vp) |
int | vn_vptocnp (struct vnode **vp, char *buf, size_t *buflen) |
static void __inline | cache_rev_failed_impl (int *reason, int line) |
int | vn_fullpath_hardlink (struct vnode *vp, struct vnode *dvp, const char *hrdl_name, size_t hrdl_name_length, char **retbuf, char **freebuf, size_t *buflen) |
struct vnode * | vn_dir_dd_ino (struct vnode *vp) |
int | vn_commname (struct vnode *vp, char *buf, u_int buflen) |
int | vn_path_to_global_path (struct thread *td, struct vnode *vp, char *path, u_int pathlen) |
void | cache_fast_lookup_enabled_recalc (void) |
static int | syscal_vfs_cache_fast_lookup (SYSCTL_HANDLER_ARGS) |
SYSCTL_PROC (_vfs, OID_AUTO, cache_fast_lookup, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_MPSAFE, &cache_fast_lookup, 0, syscal_vfs_cache_fast_lookup, "IU", "") | |
static bool | cache_fplookup_mp_supported (struct mount *mp) |
static bool | cache_fplookup_is_mp (struct cache_fpl *fpl) |
static int | cache_fplookup_cross_mount (struct cache_fpl *fpl) |
static int | cache_fplookup_partial_setup (struct cache_fpl *fpl) |
static int | cache_fplookup_skip_slashes (struct cache_fpl *fpl) |
static int | cache_fplookup_trailingslash (struct cache_fpl *fpl) |
static void | cache_fpl_pathlen_dec (struct cache_fpl *fpl) |
static void | cache_fpl_pathlen_inc (struct cache_fpl *fpl) |
static void | cache_fpl_pathlen_add (struct cache_fpl *fpl, size_t n) |
static void | cache_fpl_pathlen_sub (struct cache_fpl *fpl, size_t n) |
static void | cache_fpl_cleanup_cnp (struct componentname *cnp) |
static struct vnode * | cache_fpl_handle_root (struct cache_fpl *fpl) |
static void | cache_fpl_checkpoint_outer (struct cache_fpl *fpl) |
static void | cache_fpl_checkpoint (struct cache_fpl *fpl) |
static void | cache_fpl_restore_partial (struct cache_fpl *fpl) |
static void | cache_fpl_restore_abort (struct cache_fpl *fpl) |
static int | cache_fpl_aborted_early_impl (struct cache_fpl *fpl, int line) |
static int __noinline | cache_fpl_aborted_impl (struct cache_fpl *fpl, int line) |
static int __noinline | cache_fpl_partial_impl (struct cache_fpl *fpl, int line) |
static int | cache_fpl_handled_impl (struct cache_fpl *fpl, int line) |
static int | cache_fpl_handled_error_impl (struct cache_fpl *fpl, int error, int line) |
static bool | cache_fpl_terminated (struct cache_fpl *fpl) |
_Static_assert ((CACHE_FPL_SUPPORTED_CN_FLAGS &CACHE_FPL_INTERNAL_CN_FLAGS)==0, "supported and internal flags overlap") | |
static bool | cache_fpl_islastcn (struct nameidata *ndp) |
static bool | cache_fpl_istrailingslash (struct cache_fpl *fpl) |
static bool | cache_fpl_isdotdot (struct componentname *cnp) |
static bool | cache_can_fplookup (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_dirfd (struct cache_fpl *fpl, struct vnode **vpp) |
static int __noinline | cache_fplookup_negative_promote (struct cache_fpl *fpl, struct namecache *oncp, uint32_t hash) |
static int | cache_fplookup_final_child (struct cache_fpl *fpl, enum vgetstate tvs) |
static int __noinline | cache_fplookup_final_modifying (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_modifying (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_final_withparent (struct cache_fpl *fpl) |
static int | cache_fplookup_final (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_degenerate (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_emptypath (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_noentry (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_dot (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_dotdot (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_neg (struct cache_fpl *fpl, struct namecache *ncp, uint32_t hash) |
int | cache_symlink_resolve (struct cache_fpl *fpl, const char *string, size_t len) |
static int __noinline | cache_fplookup_symlink (struct cache_fpl *fpl) |
static int | cache_fplookup_next (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_climb_mount (struct cache_fpl *fpl) |
static void | cache_fplookup_parse (struct cache_fpl *fpl) |
static void | cache_fplookup_parse_advance (struct cache_fpl *fpl) |
static int __noinline | cache_fplookup_failed_vexec (struct cache_fpl *fpl, int error) |
static int | cache_fplookup_impl (struct vnode *dvp, struct cache_fpl *fpl) |
int | cache_fplookup (struct nameidata *ndp, enum cache_fpl_status *status, struct pwd **pwdp) |
Variables | |
static char __read_frequently | cache_fast_lookup_enabled = true |
VFS_SMR_DECLARE | |
static u_int __read_mostly | ncsize |
u_int | ncsizefactor = 2 |
static u_long __read_mostly | ncnegfactor = 5 |
static u_int | ncnegminpct = 3 |
static u_int __read_mostly | neg_min |
static struct neglist | neglists [numneglists] |
static u_int __read_mostly | ncbuckethash |
static struct mtx_padalign __read_mostly * | bucketlocks |
static u_int __read_mostly | ncvnodehash |
static struct mtx __read_mostly * | vnodelocks |
static long | zap_bucket_fail |
static long | zap_bucket_fail2 |
static long | cache_lock_vnodes_cel_3_failures |
static uma_zone_t __read_mostly | cache_zone_small |
static uma_zone_t __read_mostly | cache_zone_small_ts |
static uma_zone_t __read_mostly | cache_zone_large |
static uma_zone_t __read_mostly | cache_zone_large_ts |
static int | cache_fast_lookup = 1 |
#define cache_assert_bucket_locked | ( | x | ) | do { } while (0) |
Definition at line 880 of file vfs_cache.c.
#define cache_assert_bucket_unlocked | ( | x | ) | do { } while (0) |
Definition at line 881 of file vfs_cache.c.
#define cache_fpl_aborted | ( | x | ) | cache_fpl_aborted_impl((x), __LINE__) |
Definition at line 4129 of file vfs_cache.c.
#define cache_fpl_aborted_early | ( | x | ) | cache_fpl_aborted_early_impl((x), __LINE__) |
Definition at line 4097 of file vfs_cache.c.
#define cache_fpl_assert_status | ( | fpl | ) | do { } while (0) |
Definition at line 4059 of file vfs_cache.c.
#define CACHE_FPL_FAILED -2020 |
Definition at line 3863 of file vfs_cache.c.
#define cache_fpl_handled | ( | x | ) | cache_fpl_handled_impl((x), __LINE__) |
Definition at line 4159 of file vfs_cache.c.
#define cache_fpl_handled_error | ( | x, | |
e | |||
) | cache_fpl_handled_error_impl((x), (e), __LINE__) |
Definition at line 4179 of file vfs_cache.c.
#define CACHE_FPL_INTERNAL_CN_FLAGS (ISDOTDOT | MAKEENTRY | ISLASTCN) |
Definition at line 4194 of file vfs_cache.c.
#define cache_fpl_neg_ncp_canuse | ( | ncp | ) |
Definition at line 397 of file vfs_cache.c.
#define cache_fpl_partial | ( | x | ) | cache_fpl_partial_impl((x), __LINE__) |
Definition at line 4144 of file vfs_cache.c.
#define cache_fpl_smr_assert_entered | ( | fpl | ) | do { } while (0) |
Definition at line 4057 of file vfs_cache.c.
#define cache_fpl_smr_assert_not_entered | ( | fpl | ) | do { } while (0) |
Definition at line 4058 of file vfs_cache.c.
#define cache_fpl_smr_enter | ( | fpl | ) |
Definition at line 4068 of file vfs_cache.c.
#define cache_fpl_smr_enter_initial | ( | fpl | ) |
Definition at line 4062 of file vfs_cache.c.
#define cache_fpl_smr_exit | ( | fpl | ) |
Definition at line 4075 of file vfs_cache.c.
#define CACHE_FPL_SUPPORTED_CN_FLAGS |
Definition at line 4188 of file vfs_cache.c.
#define CACHE_LARGE_PAD 2 |
Definition at line 329 of file vfs_cache.c.
#define cache_ncp_canuse | ( | ncp | ) |
Definition at line 385 of file vfs_cache.c.
#define cache_neg_hit_abort | ( | ncp | ) | do { } while (0) |
Definition at line 1222 of file vfs_cache.c.
#define CACHE_NEG_PROMOTION_THRESH 2 |
Definition at line 1198 of file vfs_cache.c.
#define CACHE_PATH_CUTOFF 41 |
Definition at line 328 of file vfs_cache.c.
#define cache_rev_failed | ( | var | ) | cache_rev_failed_impl((var), __LINE__) |
Definition at line 3436 of file vfs_cache.c.
#define cache_sort_vnodes | ( | x, | |
y | |||
) | _cache_sort_vnodes((void **)(x), (void **)(y)) |
Definition at line 884 of file vfs_cache.c.
#define CACHE_ZONE_ALIGNMENT UMA_ALIGNOF(time_t) |
Definition at line 309 of file vfs_cache.c.
#define CACHE_ZONE_LARGE_SIZE (offsetof(struct namecache, nc_name) + NAME_MAX + 1 + CACHE_LARGE_PAD) |
Definition at line 334 of file vfs_cache.c.
#define CACHE_ZONE_LARGE_TS_SIZE (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_LARGE_SIZE) |
Definition at line 335 of file vfs_cache.c.
#define CACHE_ZONE_SMALL_SIZE (offsetof(struct namecache, nc_name) + CACHE_PATH_CUTOFF + 1) |
Definition at line 332 of file vfs_cache.c.
#define CACHE_ZONE_SMALL_TS_SIZE (offsetof(struct namecache_ts, nc_nc) + CACHE_ZONE_SMALL_SIZE) |
Definition at line 333 of file vfs_cache.c.
#define DEBUGNODE_COUNTER | ( | name, | |
varname, | |||
descr | |||
) |
Definition at line 567 of file vfs_cache.c.
#define DEBUGNODE_ULONG | ( | name, | |
varname, | |||
descr | |||
) | SYSCTL_ULONG(_vfs_cache_debug, OID_AUTO, name, CTLFLAG_RD, &varname, 0, descr); |
Definition at line 565 of file vfs_cache.c.
#define HASH2BUCKETLOCK | ( | hash | ) | ((struct mtx *)(&bucketlocks[((hash) & ncbuckethash)])) |
Definition at line 485 of file vfs_cache.c.
#define nc_neg n_un.nu_neg |
Definition at line 343 of file vfs_cache.c.
#define nc_vp n_un.nu_vp |
Definition at line 342 of file vfs_cache.c.
#define NCF_DTS 0x08 |
Definition at line 351 of file vfs_cache.c.
#define NCF_DVDROP 0x10 |
Definition at line 352 of file vfs_cache.c.
#define NCF_INVALID 0x40 |
Definition at line 354 of file vfs_cache.c.
#define NCF_ISDOTDOT 0x02 |
Definition at line 349 of file vfs_cache.c.
#define NCF_NEGATIVE 0x20 |
Definition at line 353 of file vfs_cache.c.
#define NCF_TS 0x04 |
Definition at line 350 of file vfs_cache.c.
#define NCF_WHITE 0x01 |
Definition at line 348 of file vfs_cache.c.
#define NCF_WIP 0x80 |
Definition at line 355 of file vfs_cache.c.
#define NCHHASH | ( | hash | ) | (&nchashtbl[(hash) & nchash]) |
Definition at line 437 of file vfs_cache.c.
#define ncneghash 3 |
#define NEG_HOT 0x01 |
Definition at line 360 of file vfs_cache.c.
#define numbucketlocks (ncbuckethash + 1) |
Definition at line 482 of file vfs_cache.c.
#define numneglists (ncneghash + 1) |
#define numvnodelocks (ncvnodehash + 1) |
Definition at line 488 of file vfs_cache.c.
#define STATNODE_COUNTER | ( | name, | |
varname, | |||
descr | |||
) |
Definition at line 533 of file vfs_cache.c.
#define STATNODE_ULONG | ( | name, | |
varname, | |||
descr | |||
) | SYSCTL_ULONG(_vfs_cache_stats, OID_AUTO, name, CTLFLAG_RD, &varname, 0, descr); |
Definition at line 531 of file vfs_cache.c.
__aligned | ( | CACHE_LINE_SIZE | ) |
__FBSDID | ( | "$FreeBSD$" | ) |
|
static |
Definition at line 886 of file vfs_cache.c.
_Static_assert | ( | (CACHE_FPL_SUPPORTED_CN_FLAGS &CACHE_FPL_INTERNAL_CN_FLAGS) | = =0 , |
"supported and internal flags overlap" | |||
) |
_Static_assert | ( | (CACHE_ZONE_LARGE_SIZE %(CACHE_ZONE_ALIGNMENT+1)) | = =0 , |
"bad zone size" | |||
) |
_Static_assert | ( | (CACHE_ZONE_LARGE_TS_SIZE %(CACHE_ZONE_ALIGNMENT+1)) | = =0 , |
"bad zone size" | |||
) |
_Static_assert | ( | (CACHE_ZONE_SMALL_SIZE %(CACHE_ZONE_ALIGNMENT+1)) | = =0 , |
"bad zone size" | |||
) |
_Static_assert | ( | (CACHE_ZONE_SMALL_TS_SIZE %(CACHE_ZONE_ALIGNMENT+1)) | = =0 , |
"bad zone size" | |||
) |
_Static_assert | ( | sizeof(struct negstate)<=sizeof(struct vnode *) | , |
"the state must fit in a union with a pointer without growing it" | |||
) |
|
static |
Definition at line 721 of file vfs_cache.c.
References cache_alloc_uma(), cache_neg_evict_cond(), ncsize, and ts.
Referenced by cache_enter_time().
|
static |
Definition at line 681 of file vfs_cache.c.
References CACHE_PATH_CUTOFF, cache_zone_large, cache_zone_large_ts, cache_zone_small, cache_zone_small_ts, namecache_ts::nc_nc, and ts.
Referenced by cache_alloc().
|
inlinestatic |
Definition at line 592 of file vfs_cache.c.
Referenced by cache_assert_vnode_locked(), and cache_lock_vnodes_cel_3().
|
inlinestatic |
Definition at line 600 of file vfs_cache.c.
References cache_assert_vlp_locked(), mtx, and VP2VNODELOCK().
Referenced by cache_hold_vnode(), cache_zap_locked(), cache_zap_locked_vnode_kl2(), cache_zap_negative_locked_vnode_kl(), and vn_dd_from_dst().
|
static |
Definition at line 4226 of file vfs_cache.c.
References cache_fast_lookup_enabled, cache_fpl_aborted_early, CACHE_FPL_SUPPORTED_CN_FLAGS, cache_fpl::cnp, and cache_fpl::ndp.
Referenced by cache_fplookup().
|
inlinestatic |
Definition at line 2137 of file vfs_cache.c.
Referenced by cache_enter_dotdot_prep(), and cache_enter_time().
void cache_changesize | ( | u_long | newmaxvnodes | ) |
Definition at line 2766 of file vfs_cache.c.
References cache_changesize_set_new(), cache_changesize_set_temp(), cache_get_hash(), cache_lock_all_buckets(), cache_lock_all_vnodes(), cache_recalc_neg_min(), cache_roundup_2(), cache_unlock_all_buckets(), cache_unlock_all_vnodes(), namecache::nc_name, namecache::nc_nlen, ncfreetbl(), nchinittbl(), ncnegminpct, ncsize, ncsizefactor, and numbucketlocks.
Referenced by sysctl_maxvnodes().
|
static |
Definition at line 2742 of file vfs_cache.c.
Referenced by cache_changesize().
|
static |
Definition at line 2710 of file vfs_cache.c.
Referenced by cache_changesize().
|
static |
Definition at line 627 of file vfs_cache.c.
References vdrop().
Referenced by cache_free(), and cache_free_batch().
|
static |
Definition at line 2345 of file vfs_cache.c.
References cache_celockstate_init(), cache_enter_lock_dd(), cache_enter_unlock(), cache_free(), cache_get_hash(), cache_zap_locked(), namecache::nc_flag, and NCF_ISDOTDOT.
Referenced by cache_enter_time().
|
static |
Definition at line 2257 of file vfs_cache.c.
References cache_lock_buckets_cel(), cache_lock_vnodes_cel(), cache_lock_vnodes_cel_3(), cache_unlock_vnodes_cel(), HASH2BUCKETLOCK, mtx, namecache::nc_flag, NCF_ISDOTDOT, NCF_NEGATIVE, NCP2BUCKETLOCK(), celockstate::vlp, and VP2VNODELOCK().
Referenced by cache_enter_time().
|
static |
Definition at line 2300 of file vfs_cache.c.
References cache_lock_buckets_cel(), cache_lock_vnodes_cel(), cache_lock_vnodes_cel_3(), cache_unlock_vnodes_cel(), HASH2BUCKETLOCK, mtx, namecache::nc_flag, NCF_ISDOTDOT, NCF_NEGATIVE, NCP2BUCKETLOCK(), celockstate::vlp, and VP2VNODELOCK().
Referenced by cache_enter_dotdot_prep().
void cache_enter_time | ( | struct vnode * | dvp, |
struct vnode * | vp, | ||
struct componentname * | cnp, | ||
struct timespec * | tsp, | ||
struct timespec * | dtsp | ||
) |
Definition at line 2376 of file vfs_cache.c.
References cache_alloc(), cache_celockstate_init(), cache_enter_dotdot_prep(), cache_enter_lock(), cache_enter_unlock(), cache_free(), cache_get_hash(), cache_hold_vnode(), cache_ncp_canuse, cache_neg_init(), cache_neg_insert(), cache_zap_locked(), flag, namecache_ts::nc_dotdottime, namecache::nc_flag, namecache::nc_name, namecache_ts::nc_nc, namecache::nc_nlen, namecache_ts::nc_ticks, namecache_ts::nc_time, NCF_DTS, NCF_ISDOTDOT, NCF_NEGATIVE, NCF_TS, NCF_WHITE, NCF_WIP, NCHHASH, and ticks.
Referenced by cache_enter_time_flags().
void cache_enter_time_flags | ( | struct vnode * | dvp, |
struct vnode * | vp, | ||
struct componentname * | cnp, | ||
struct timespec * | tsp, | ||
struct timespec * | dtsp, | ||
int | flags | ||
) |
Definition at line 2597 of file vfs_cache.c.
References cache_enter_time(), cache_remove_cnp(), and flags.
|
static |
Definition at line 2337 of file vfs_cache.c.
References cache_unlock_buckets_cel(), and cache_unlock_vnodes_cel().
Referenced by cache_enter_dotdot_prep(), and cache_enter_time().
void cache_fast_lookup_enabled_recalc | ( | void | ) |
Definition at line 3866 of file vfs_cache.c.
References cache_fast_lookup, and cache_fast_lookup_enabled.
Referenced by syscal_vfs_cache_fast_lookup().
|
static |
Definition at line 4083 of file vfs_cache.c.
References CACHE_FPL_FAILED, cache_fpl_smr_assert_not_entered, cache_fpl::line, and cache_fpl::status.
|
static |
Definition at line 4100 of file vfs_cache.c.
References cache_fpl_cleanup_cnp(), CACHE_FPL_FAILED, cache_fpl_restore_abort(), cache_fpl_smr_exit, cache_fpl::cnp, cache_fpl::in_smr, cache_fpl::line, cache_fpl::ndp, and cache_fpl::status.
|
static |
Definition at line 3998 of file vfs_cache.c.
References cache_fpl::ndp, and cache_fpl::snd.
Referenced by cache_fplookup_impl(), cache_fplookup_symlink(), and cache_fplookup_trailingslash().
|
static |
Definition at line 3990 of file vfs_cache.c.
References nameidata_outer::cn_flags, cache_fpl::ndp, nameidata_outer::ni_pathlen, and cache_fpl::snd_outer.
Referenced by cache_fplookup().
|
static |
Definition at line 3956 of file vfs_cache.c.
References namei_zone.
Referenced by cache_fpl_aborted_impl(), and cache_fplookup().
|
static |
Definition at line 3967 of file vfs_cache.c.
References cache_fpl_pathlen_dec(), cache_fpl::cnp, and cache_fpl::ndp.
Referenced by cache_fplookup(), and cache_fplookup_symlink().
|
static |
Definition at line 4162 of file vfs_cache.c.
References CACHE_FPL_FAILED, cache_fpl_smr_assert_not_entered, cache_fpl::dvp, cache_fpl::line, cache_fpl::savename, cache_fpl::status, and cache_fpl::tvp.
|
static |
Definition at line 4147 of file vfs_cache.c.
References cache_fpl_smr_assert_not_entered, cache_fpl::line, and cache_fpl::status.
|
static |
Definition at line 4216 of file vfs_cache.c.
Referenced by cache_fplookup_dotdot(), cache_fplookup_final_modifying(), cache_fplookup_next(), cache_fplookup_noentry(), and cache_fplookup_partial_setup().
|
static |
Definition at line 4201 of file vfs_cache.c.
Referenced by cache_fplookup_final_modifying(), cache_fplookup_impl(), cache_fplookup_modifying(), cache_fplookup_noentry(), cache_fplookup_partial_setup(), cache_fplookup_symlink(), and cache_fplookup_trailingslash().
|
static |
Definition at line 4208 of file vfs_cache.c.
References cache_fpl::cnp, and cache_fpl::nulchar.
Referenced by cache_fplookup_failed_vexec(), cache_fplookup_final_modifying(), cache_fplookup_noentry(), cache_fplookup_trailingslash(), and cache_symlink_resolve().
|
static |
Definition at line 4132 of file vfs_cache.c.
References cache_fpl_smr_assert_entered, cache_fplookup_partial_setup(), cache_fpl::line, and cache_fpl::status.
|
static |
Definition at line 5519 of file vfs_cache.c.
Referenced by cache_fplookup_trailingslash(), and cache_symlink_resolve().
|
static |
Definition at line 5534 of file vfs_cache.c.
Referenced by cache_fpl_handle_root(), cache_fplookup_parse_advance(), cache_fplookup_partial_setup(), and cache_fplookup_skip_slashes().
|
static |
Definition at line 5529 of file vfs_cache.c.
Referenced by cache_fplookup_skip_slashes().
|
static |
Definition at line 5524 of file vfs_cache.c.
Referenced by cache_fplookup_parse().
|
static |
Definition at line 4018 of file vfs_cache.c.
References cache_fpl_restore_partial(), cache_fpl::ndp, nameidata_outer::ni_pathlen, and cache_fpl::snd_outer.
Referenced by cache_fpl_aborted_impl().
|
static |
Definition at line 4008 of file vfs_cache.c.
References nameidata_outer::cn_flags, cache_fpl::ndp, cache_fpl::snd, and cache_fpl::snd_outer.
Referenced by cache_fpl_restore_abort(), and cache_fplookup_partial_setup().
|
static |
Definition at line 4182 of file vfs_cache.c.
References cache_fpl::status.
Referenced by cache_fplookup_impl().
int cache_fplookup | ( | struct nameidata * | ndp, |
enum cache_fpl_status * | status, | ||
struct pwd ** | pwdp | ||
) |
Definition at line 6053 of file vfs_cache.c.
References cache_can_fplookup(), cache_fpl_assert_status, cache_fpl_checkpoint_outer(), cache_fpl_cleanup_cnp(), CACHE_FPL_FAILED, cache_fpl_handle_root(), CACHE_FPL_INTERNAL_CN_FLAGS, cache_fpl_smr_assert_not_entered, cache_fpl_smr_enter_initial, cache_fplookup_dirfd(), cache_fplookup_impl(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::fsearch, cache_fpl::in_smr, cache_fpl::line, namei(), cache_fpl::ndp, cache_fpl::nulchar, cache_fpl::pwd, cache_fpl::savename, cache_fpl::status, and cache_fpl::tvp.
Referenced by namei().
|
static |
Definition at line 5352 of file vfs_cache.c.
References cache_fpl_partial, cache_fplookup_mp_supported(), cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup_cross_mount().
|
static |
Definition at line 5409 of file vfs_cache.c.
References cache_fpl_partial, cache_fplookup_climb_mount(), cache_fplookup_mp_supported(), cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup_dot(), and cache_fplookup_next().
|
static |
Definition at line 4736 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled, cache_fpl_handled_error, cache_fpl_smr_exit, cache_fplookup_final_withparent(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::tvp, cache_fpl::tvp_seqc, vget_finish(), vget_finish_ref(), and vget_prep_smr().
Referenced by cache_fplookup_failed_vexec(), and cache_fplookup_noentry().
|
static |
Definition at line 4260 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled_error, cache_fpl_smr_exit, cache_fpl::cnp, fgetvp_lookup_smr(), cache_fpl::fsearch, and cache_fpl::ndp.
Referenced by cache_fplookup().
|
static |
Definition at line 4994 of file vfs_cache.c.
References cache_fplookup_cross_mount(), cache_fplookup_is_mp(), cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup_next().
|
static |
Definition at line 5018 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_isdotdot(), cache_fpl_partial, cache_ncp_canuse, cache_fpl::cnp, cache_fpl::dvp, namecache::nc_flag, NCF_ISDOTDOT, NCF_NEGATIVE, cache_fpl::ndp, pr, rootvnode, cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup_next().
|
static |
Definition at line 4792 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled, cache_fpl_handled_error, cache_fpl_smr_exit, cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::ndp, cache_fpl::tvp, cache_fpl::tvp_seqc, vget_finish(), vget_finish_ref(), and vget_prep_smr().
Referenced by cache_fplookup_failed_vexec(), and cache_fplookup_noentry().
|
static |
Definition at line 5805 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled_error, cache_fpl_istrailingslash(), cache_fpl_partial, cache_fpl_smr_exit, cache_fplookup_degenerate(), cache_fplookup_emptypath(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::fsearch, and cache_fpl::tvp.
Referenced by cache_fplookup_impl().
|
static |
Definition at line 4694 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_partial, cache_fpl_smr_exit, cache_fplookup_final_child(), cache_fplookup_final_modifying(), cache_fplookup_final_withparent(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::tvp, vget_abort(), and vget_prep_smr().
Referenced by cache_fplookup_impl(), and cache_fplookup_symlink().
|
static |
Definition at line 4386 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled, cache_fpl::cnp, cache_fpl::tvp, cache_fpl::tvp_seqc, vget_finish(), vget_finish_ref(), vput(), and vrele().
Referenced by cache_fplookup_final(), and cache_fplookup_final_withparent().
|
static |
Definition at line 4424 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled, cache_fpl_handled_error, cache_fpl_isdotdot(), cache_fpl_islastcn(), cache_fpl_istrailingslash(), cache_fpl_partial, cache_fpl_smr_exit, cache_fplookup_is_mp(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::ndp, cache_fpl::savename, cache_fpl::tvp, vget_finish_ref(), vget_prep_smr(), vput(), vrefact(), and vrele().
Referenced by cache_fplookup_final(), and cache_fplookup_modifying().
|
static |
Definition at line 4628 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_smr_exit, cache_fplookup_final_child(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::status, cache_fpl::tvp, vget_abort(), vget_finish(), vget_finish_ref(), vget_prep_smr(), vput(), and vrele().
Referenced by cache_fplookup_degenerate(), and cache_fplookup_final().
|
static |
Definition at line 5906 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_checkpoint(), cache_fpl_islastcn(), cache_fpl_terminated(), cache_fplookup_failed_vexec(), cache_fplookup_final(), cache_fplookup_mp_supported(), cache_fplookup_next(), cache_fplookup_parse(), cache_fplookup_parse_advance(), cache_fplookup_symlink(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::ndp, cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup().
|
static |
Definition at line 5465 of file vfs_cache.c.
References cache_fpl::tvp.
Referenced by cache_fplookup_dot(), cache_fplookup_final_modifying(), cache_fplookup_next(), and cache_fplookup_noentry().
|
static |
Definition at line 4615 of file vfs_cache.c.
References cache_fpl_islastcn(), cache_fpl_partial, cache_fplookup_final_modifying(), and cache_fpl::ndp.
Referenced by cache_fplookup_neg(), and cache_fplookup_noentry().
|
static |
Definition at line 5324 of file vfs_cache.c.
Referenced by cache_fplookup_climb_mount(), cache_fplookup_cross_mount(), cache_fplookup_impl(), and cache_fplookup_symlink().
|
static |
Definition at line 5096 of file vfs_cache.c.
References cache_fpl_handled_error, cache_fpl_neg_ncp_canuse, cache_fpl_partial, cache_fpl_smr_exit, cache_fplookup_modifying(), cache_fplookup_negative_promote(), cache_neg_hit_abort, cache_neg_hit_finish(), cache_neg_hit_prep(), cache_fpl::cnp, namecache::nc_flag, NCF_NEGATIVE, and cache_fpl::tvp.
Referenced by cache_fplookup_next().
|
static |
Definition at line 4285 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled_error, cache_fpl_smr_exit, cache_neg_promote_cond(), cache_fpl::cnp, and cache_fpl::dvp.
Referenced by cache_fplookup_neg().
|
static |
Definition at line 5263 of file vfs_cache.c.
References cache_fpl_isdotdot(), cache_fpl_partial, cache_fplookup_cross_mount(), cache_fplookup_dot(), cache_fplookup_dotdot(), cache_fplookup_is_mp(), cache_fplookup_neg(), cache_fplookup_noentry(), cache_ncp_canuse, cache_fpl::cnp, cache_fpl::dvp, cache_fpl::hash, namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_NEGATIVE, NCHHASH, cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup_impl().
|
static |
Definition at line 4839 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_handled, cache_fpl_handled_error, cache_fpl_isdotdot(), cache_fpl_islastcn(), cache_fpl_istrailingslash(), cache_fpl_partial, cache_fpl_smr_exit, cache_fplookup_degenerate(), cache_fplookup_emptypath(), cache_fplookup_is_mp(), cache_fplookup_modifying(), cache_fplookup_skip_slashes(), cache_fplookup_trailingslash(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::ndp, cache_fpl::savename, cache_fpl::tvp, vget_finish_ref(), vget_prep_smr(), vput(), and vrele().
Referenced by cache_fplookup_next().
|
static |
Definition at line 5540 of file vfs_cache.c.
References cache_fpl_pathlen_sub(), cache_get_hash(), cache_get_hash_iter(), cache_get_hash_iter_finish(), cache_get_hash_iter_start(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::hash, cache_fpl::ndp, cache_fpl::nulchar, and panic().
Referenced by cache_fplookup_impl().
|
static |
Definition at line 5607 of file vfs_cache.c.
References cache_fpl_pathlen_dec(), cache_fpl::cnp, and cache_fpl::ndp.
Referenced by cache_fplookup_impl().
|
static |
Definition at line 4305 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_isdotdot(), cache_fpl_islastcn(), cache_fpl_pathlen_dec(), cache_fpl_restore_partial(), cache_fpl_smr_exit, cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::ndp, cache_fpl::nulchar, panic(), cache_fpl::pwd, pwd_drop(), pwd_hold_smr(), cache_fpl::snd, vget_finish_ref(), vget_prep_smr(), and vrele().
Referenced by cache_fpl_partial_impl().
|
static |
Definition at line 5633 of file vfs_cache.c.
References cache_fpl_pathlen_dec(), cache_fpl_pathlen_inc(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::ndp, cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup_noentry().
|
static |
Definition at line 5191 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_checkpoint(), cache_fpl_handle_root(), cache_fpl_handled_error, cache_fpl_islastcn(), cache_fpl_partial, cache_fpl_smr_exit, cache_fplookup_final(), cache_fplookup_mp_supported(), cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, cache_fpl::ndp, and cache_fpl::tvp.
Referenced by cache_fplookup_impl().
|
static |
Definition at line 5686 of file vfs_cache.c.
References cache_fpl_aborted, cache_fpl_checkpoint(), cache_fpl_handled_error, cache_fpl_islastcn(), cache_fpl_istrailingslash(), cache_fpl_pathlen_add(), cache_fpl_smr_exit, cache_fpl::cnp, cache_fpl::dvp, cache_fpl::dvp_seqc, namecache::nc_flag, NCF_ISDOTDOT, cache_fpl::ndp, cache_fpl::nulchar, panic(), cache_fpl::tvp, and cache_fpl::tvp_seqc.
Referenced by cache_fplookup_noentry().
|
static |
Definition at line 750 of file vfs_cache.c.
References cache_drop_vnode(), cache_free_uma(), namecache::nc_flag, and NCF_DVDROP.
Referenced by cache_enter_dotdot_prep(), cache_enter_time(), cache_lookup_dotdot(), cache_lookup_fallback(), cache_neg_evict(), and cache_remove_cnp().
|
static |
Definition at line 762 of file vfs_cache.c.
References cache_drop_vnode(), cache_free_uma(), namecache::nc_flag, and NCF_DVDROP.
Referenced by cache_purge_impl(), and cache_purge_negative().
|
static |
Definition at line 702 of file vfs_cache.c.
References CACHE_PATH_CUTOFF, cache_zone_large, cache_zone_large_ts, cache_zone_small, cache_zone_small_ts, namecache::nc_flag, namecache_ts::nc_nc, namecache::nc_nlen, and NCF_TS.
Referenced by cache_free(), and cache_free_batch().
|
static |
Definition at line 816 of file vfs_cache.c.
References name.
Referenced by cache_changesize(), cache_enter_dotdot_prep(), cache_enter_time(), cache_fplookup_parse(), cache_lookup(), cache_lookup_fallback(), cache_neg_evict(), cache_remove_cnp(), NCP2BUCKET(), and NCP2BUCKETLOCK().
|
static |
Definition at line 830 of file vfs_cache.c.
Referenced by cache_fplookup_parse().
|
static |
Definition at line 837 of file vfs_cache.c.
Referenced by cache_fplookup_parse().
|
static |
Definition at line 823 of file vfs_cache.c.
Referenced by cache_fplookup_parse().
|
static |
Definition at line 2862 of file vfs_cache.c.
Referenced by cache_purge(), cache_purge_vgone(), and cache_purgevfs().
|
static |
Definition at line 617 of file vfs_cache.c.
References cache_assert_vnode_locked(), and vhold().
Referenced by cache_enter_time().
|
static |
Definition at line 900 of file vfs_cache.c.
References bucketlocks, and numbucketlocks.
Referenced by cache_changesize().
|
static |
Definition at line 918 of file vfs_cache.c.
References numvnodelocks, and vnodelocks.
Referenced by cache_changesize().
|
static |
Definition at line 2220 of file vfs_cache.c.
References celockstate::blp, and cache_sort_vnodes.
Referenced by cache_enter_lock(), and cache_enter_lock_dd().
Definition at line 955 of file vfs_cache.c.
Referenced by cache_zap_unlocked_bucket().
|
static |
Definition at line 2144 of file vfs_cache.c.
References cache_sort_vnodes, mtx, celockstate::vlp, and VP2VNODELOCK().
Referenced by cache_enter_lock(), and cache_enter_lock_dd().
|
static |
Definition at line 2182 of file vfs_cache.c.
References cache_assert_vlp_locked(), cache_lock_vnodes_cel_3_failures, cache_unlock_vnodes_cel(), mtx, celockstate::vlp, and VP2VNODELOCK().
Referenced by cache_enter_lock(), and cache_enter_lock_dd().
int cache_lookup | ( | struct vnode * | dvp, |
struct vnode ** | vpp, | ||
struct componentname * | cnp, | ||
struct timespec * | tsp, | ||
int * | ticksp | ||
) |
Definition at line 2023 of file vfs_cache.c.
References cache_get_hash(), cache_lookup_dot(), cache_lookup_dotdot(), cache_lookup_fallback(), cache_ncp_canuse, cache_neg_hit_abort, cache_neg_hit_finish(), cache_neg_hit_prep(), cache_neg_promote_cond(), cache_out_ts(), cache_remove_cnp(), namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_NEGATIVE, NCF_WHITE, NCHHASH, vget_finish(), and vget_prep_smr().
Referenced by vfs_cache_lookup().
|
static |
Definition at line 1788 of file vfs_cache.c.
References ticks, vrefact(), and vrele().
Referenced by cache_lookup().
|
static |
Definition at line 1822 of file vfs_cache.c.
References cache_free(), cache_neg_hit_finish(), cache_neg_hit_prep(), cache_neg_promote(), cache_out_ts(), cache_remove_cnp(), cache_zap_negative_locked_vnode_kl(), mtx, namecache_ts::nc_dotdottime, namecache::nc_flag, NCF_DTS, NCF_ISDOTDOT, NCF_NEGATIVE, NCF_WHITE, vget_finish(), vget_prep(), VP2VNODELOCK(), and vput().
Referenced by cache_lookup().
|
static |
Lookup a name in the name cache
Either both tsp and ticks have to be provided or neither of them.
On a cache hit, vpp will be returned locked and ref'd. If we're looking up .., dvp is unlocked. If we're looking up . an extra ref is taken, but the lock is not recursively acquired.
Definition at line 1946 of file vfs_cache.c.
References cache_free(), cache_get_hash(), cache_neg_hit_finish(), cache_neg_hit_prep(), cache_neg_promote(), cache_out_ts(), cache_zap_locked_bucket(), HASH2BUCKETLOCK, mtx, namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_NEGATIVE, NCF_WHITE, NCHHASH, vget_finish(), vget_prep(), and zap_bucket_fail2.
Referenced by cache_lookup().
|
static |
Definition at line 370 of file vfs_cache.c.
References namecache::nc_flag, and NCF_INVALID.
Referenced by cache_zap_locked().
|
static |
Definition at line 1256 of file vfs_cache.c.
References NCP2NEGLIST(), NCP2NEGSTATE(), negstate::neg_flag, negstate::neg_hit, and NEG_HOT.
Referenced by cache_neg_evict().
|
static |
Definition at line 1439 of file vfs_cache.c.
References cache_free(), cache_get_hash(), cache_neg_demote_locked(), cache_neg_evict_select_entry(), cache_neg_evict_select_list(), cache_zap_locked(), HASH2BUCKETLOCK, mtx, namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_NEGATIVE, NCHHASH, NCP2BUCKETLOCK(), and VP2VNODELOCK().
Referenced by cache_neg_evict_cond().
|
static |
Definition at line 1518 of file vfs_cache.c.
References cache_neg_evict(), ncnegfactor, ncsize, and neg_min.
Referenced by cache_alloc().
|
static |
Definition at line 1412 of file vfs_cache.c.
References NCP2NEGSTATE(), and negstate::neg_hit.
Referenced by cache_neg_evict().
|
static |
Definition at line 1397 of file vfs_cache.c.
References neglists, and numneglists.
Referenced by cache_neg_evict().
|
static |
Definition at line 1225 of file vfs_cache.c.
References namecache::nc_name.
Referenced by cache_fplookup_neg(), cache_lookup(), cache_lookup_dotdot(), cache_lookup_fallback(), and cache_neg_promote_cond().
|
static |
Definition at line 1201 of file vfs_cache.c.
References CACHE_NEG_PROMOTION_THRESH, NCP2NEGSTATE(), and negstate::neg_hit.
Referenced by cache_fplookup_neg(), cache_lookup(), cache_lookup_dotdot(), and cache_lookup_fallback().
|
static |
Definition at line 1187 of file vfs_cache.c.
References namecache::nc_flag, NCF_NEGATIVE, NCP2NEGSTATE(), negstate::neg_flag, and negstate::neg_hit.
Referenced by cache_enter_time().
|
static |
Definition at line 1363 of file vfs_cache.c.
References cache_assert_bucket_locked, namecache::nc_flag, NCF_NEGATIVE, and NCP2NEGLIST().
Referenced by cache_enter_time().
|
static |
Definition at line 1352 of file vfs_cache.c.
References cache_neg_promote_locked(), and NCP2NEGLIST().
Referenced by cache_lookup_dotdot(), and cache_lookup_fallback().
|
static |
Definition at line 1282 of file vfs_cache.c.
References cache_ncp_canuse, cache_neg_hit_finish(), cache_neg_promote_locked(), namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_NEGATIVE, NCHHASH, and NCP2NEGLIST().
Referenced by cache_fplookup_negative_promote(), and cache_lookup().
|
static |
Definition at line 1236 of file vfs_cache.c.
References NCP2NEGLIST(), NCP2NEGSTATE(), negstate::neg_flag, and NEG_HOT.
Referenced by cache_neg_promote(), and cache_neg_promote_cond().
|
static |
Definition at line 1377 of file vfs_cache.c.
References cache_assert_bucket_locked, NCP2NEGLIST(), NCP2NEGSTATE(), negstate::neg_flag, and NEG_HOT.
Referenced by cache_zap_locked().
|
static |
Definition at line 499 of file vfs_cache.c.
References namecache::nc_flag, namecache_ts::nc_nc, namecache_ts::nc_ticks, namecache_ts::nc_time, and NCF_TS.
Referenced by cache_lookup(), cache_lookup_dotdot(), and cache_lookup_fallback().
|
static |
Definition at line 809 of file vfs_cache.c.
Referenced by cache_vnode_init().
void cache_purge | ( | struct vnode * | vp | ) |
Definition at line 2872 of file vfs_cache.c.
References cache_has_entries(), and cache_purge_impl().
Referenced by cache_purgevfs(), cache_vop_rename(), cache_vop_rmdir(), do_unlink(), vfs_domount_first(), and vfs_mountroot_shuffle().
|
static |
Definition at line 2820 of file vfs_cache.c.
References cache_free_batch(), cache_zap_locked_vnode_kl2(), mtx, namecache::nc_flag, NCF_ISDOTDOT, and VP2VNODELOCK().
Referenced by cache_purge(), and cache_purge_vgone().
void cache_purge_negative | ( | struct vnode * | vp | ) |
Definition at line 2911 of file vfs_cache.c.
References cache_free_batch(), cache_zap_negative_locked_vnode_kl(), mtx, namecache::nc_flag, NCF_NEGATIVE, and VP2VNODELOCK().
void cache_purge_vgone | ( | struct vnode * | vp | ) |
Definition at line 2885 of file vfs_cache.c.
References cache_has_entries(), cache_purge_impl(), mtx, mtx_wait_unlocked(), and VP2VNODELOCK().
Referenced by vgonel().
void cache_purgevfs | ( | struct mount * | mp | ) |
Definition at line 3013 of file vfs_cache.c.
References cache_has_entries(), cache_purge(), and vdrop().
Referenced by vfs_mountroot_shuffle().
|
static |
Definition at line 1002 of file vfs_cache.c.
References ncsize, and neg_min.
Referenced by cache_changesize(), nchinit(), and sysctl_negminpct().
|
static |
Definition at line 1713 of file vfs_cache.c.
References cache_free(), cache_get_hash(), cache_zap_locked_bucket(), cache_zap_locked_vnode_kl2(), HASH2BUCKETLOCK, mtx, namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_ISDOTDOT, NCHHASH, VP2VNODELOCK(), and zap_bucket_fail.
Referenced by cache_enter_time_flags(), cache_lookup(), cache_lookup_dotdot(), and cache_vop_rename().
|
static |
Definition at line 3431 of file vfs_cache.c.
|
static |
Definition at line 2609 of file vfs_cache.c.
References res.
Referenced by cache_changesize(), nchinit(), and nchinittbl().
char * cache_symlink_alloc | ( | size_t | size, |
int | flags | ||
) |
Definition at line 647 of file vfs_cache.c.
References cache_zone_large, CACHE_ZONE_LARGE_SIZE, cache_zone_small, CACHE_ZONE_SMALL_SIZE, and flags.
void cache_symlink_free | ( | char * | string, |
size_t | size | ||
) |
Definition at line 662 of file vfs_cache.c.
References cache_zone_large, CACHE_ZONE_LARGE_SIZE, cache_zone_small, and CACHE_ZONE_SMALL_SIZE.
int cache_symlink_resolve | ( | struct cache_fpl * | fpl, |
const char * | string, | ||
size_t | len | ||
) |
Definition at line 5132 of file vfs_cache.c.
References cache_fpl_istrailingslash(), cache_fpl_pathlen_add(), cache_fpl::cnp, cache_fpl::ndp, cache_fpl::nulchar, panic(), and cache_fpl::tvp.
Definition at line 936 of file vfs_cache.c.
References cache_sort_vnodes.
Referenced by cache_zap_locked_bucket().
|
static |
Definition at line 909 of file vfs_cache.c.
References bucketlocks, and numbucketlocks.
Referenced by cache_changesize().
|
static |
Definition at line 927 of file vfs_cache.c.
References numvnodelocks, and vnodelocks.
Referenced by cache_changesize().
|
static |
Definition at line 2238 of file vfs_cache.c.
References celockstate::blp.
Referenced by cache_enter_unlock().
Definition at line 968 of file vfs_cache.c.
Referenced by cache_zap_locked_bucket(), and cache_zap_unlocked_bucket().
|
static |
Definition at line 2168 of file vfs_cache.c.
References celockstate::vlp.
Referenced by cache_enter_lock(), cache_enter_lock_dd(), cache_enter_unlock(), and cache_lock_vnodes_cel_3().
void cache_vnode_init | ( | struct vnode * | vp | ) |
Definition at line 2691 of file vfs_cache.c.
References cache_prehash().
Referenced by vnode_init().
void cache_vop_rename | ( | struct vnode * | fdvp, |
struct vnode * | fvp, | ||
struct vnode * | tdvp, | ||
struct vnode * | tvp, | ||
struct componentname * | fcnp, | ||
struct componentname * | tcnp | ||
) |
Definition at line 2937 of file vfs_cache.c.
References cache_purge(), and cache_remove_cnp().
void cache_vop_rmdir | ( | struct vnode * | dvp, |
struct vnode * | vp | ||
) |
Definition at line 2973 of file vfs_cache.c.
References cache_purge().
|
static |
Definition at line 1540 of file vfs_cache.c.
References cache_assert_bucket_locked, cache_assert_vnode_locked(), cache_ncp_invalidate(), cache_neg_remove(), namecache::nc_flag, namecache::nc_name, NCF_DVDROP, NCF_ISDOTDOT, NCF_NEGATIVE, and NCP2BUCKET().
Referenced by cache_enter_dotdot_prep(), cache_enter_time(), cache_neg_evict(), cache_zap_locked_bucket(), cache_zap_locked_vnode_kl2(), cache_zap_negative_locked_vnode_kl(), and cache_zap_unlocked_bucket().
|
static |
Definition at line 1688 of file vfs_cache.c.
References cache_assert_bucket_locked, cache_trylock_vnodes(), cache_unlock_vnodes(), cache_zap_locked(), cache_zap_unlocked_bucket(), mtx, namecache::nc_flag, NCF_NEGATIVE, and VP2VNODELOCK().
Referenced by cache_lookup_fallback(), and cache_remove_cnp().
|
static |
Definition at line 1595 of file vfs_cache.c.
References cache_assert_vnode_locked(), cache_sort_vnodes, cache_zap_locked(), cache_zap_negative_locked_vnode_kl(), mtx, namecache::nc_flag, NCF_NEGATIVE, NCP2BUCKETLOCK(), and VP2VNODELOCK().
Referenced by cache_purge_impl(), and cache_remove_cnp().
|
static |
Definition at line 1580 of file vfs_cache.c.
References cache_assert_vnode_locked(), cache_zap_locked(), mtx, namecache::nc_flag, NCF_NEGATIVE, and NCP2BUCKETLOCK().
Referenced by cache_lookup_dotdot(), cache_purge_negative(), and cache_zap_locked_vnode_kl2().
|
static |
Definition at line 1657 of file vfs_cache.c.
References cache_assert_bucket_unlocked, cache_lock_vnodes(), cache_sort_vnodes, cache_unlock_vnodes(), cache_zap_locked(), namecache::nc_name, namecache::nc_nlen, and NCHHASH.
Referenced by cache_zap_locked_bucket().
|
static |
Definition at line 439 of file vfs_cache.c.
|
static |
|
static |
|
static |
|
static |
|
static |
CTASSERT | ( | (nitems(((struct celockstate *) 0) ->blp)==2) | ) |
CTASSERT | ( | (nitems(((struct celockstate *) 0) ->vlp)==3) | ) |
DEBUGNODE_COUNTER | ( | zap_bucket_relock_success | , |
zap_bucket_relock_success | , | ||
"Number of successful removals after relocking" | |||
) |
DEBUGNODE_ULONG | ( | vnodes_cel_3_failures | , |
cache_lock_vnodes_cel_3_failures | , | ||
"Number of times 3-way vnode locking failed" | |||
) |
DEBUGNODE_ULONG | ( | zap_bucket_fail | , |
zap_bucket_fail | , | ||
"" | |||
) |
DEBUGNODE_ULONG | ( | zap_bucket_fail2 | , |
zap_bucket_fail2 | , | ||
"" | |||
) |
|
static |
Definition at line 3134 of file vfs_cache.c.
References buf, cap_fstat_rights, fd, flags, free(), namei(), NDFREE(), path, and vn_fullpath_hardlink().
Referenced by sys___realpathat().
|
static |
|
static |
Definition at line 2635 of file vfs_cache.c.
References free().
Referenced by cache_changesize().
|
static |
Definition at line 2645 of file vfs_cache.c.
References bucketlocks, cache_recalc_neg_min(), cache_roundup_2(), CACHE_ZONE_ALIGNMENT, cache_zone_large, CACHE_ZONE_LARGE_SIZE, cache_zone_large_ts, CACHE_ZONE_LARGE_TS_SIZE, cache_zone_small, CACHE_ZONE_SMALL_SIZE, cache_zone_small_ts, CACHE_ZONE_SMALL_TS_SIZE, desiredvnodes, malloc(), mp_ncpus, ncbuckethash, nchinittbl(), ncnegminpct, ncsize, ncsizefactor, ncvnodehash, neglists, numbucketlocks, numneglists, numvnodelocks, and vnodelocks.
|
static |
Definition at line 2620 of file vfs_cache.c.
References cache_roundup_2(), and malloc().
Referenced by cache_changesize(), and nchinit().
|
inlinestatic |
Definition at line 844 of file vfs_cache.c.
References cache_get_hash(), namecache::nc_name, namecache::nc_nlen, and NCHHASH.
Referenced by cache_zap_locked().
Definition at line 853 of file vfs_cache.c.
References cache_get_hash(), HASH2BUCKETLOCK, namecache::nc_name, and namecache::nc_nlen.
Referenced by cache_enter_lock(), cache_enter_lock_dd(), cache_neg_evict(), cache_zap_locked_vnode_kl2(), and cache_zap_negative_locked_vnode_kl().
|
inlinestatic |
Definition at line 468 of file vfs_cache.c.
References ncneghash, and neglists.
Referenced by cache_neg_demote_locked(), cache_neg_insert(), cache_neg_promote(), cache_neg_promote_cond(), cache_neg_promote_locked(), and cache_neg_remove().
Definition at line 475 of file vfs_cache.c.
References namecache::nc_flag, and NCF_NEGATIVE.
Referenced by cache_neg_demote_locked(), cache_neg_evict_select_entry(), cache_neg_hit_prep(), cache_neg_init(), cache_neg_promote_locked(), and cache_neg_remove().
SDT_PROBE_DECLARE | ( | vfs | , |
namei | , | ||
lookup | , | ||
entry | |||
) |
SDT_PROBE_DECLARE | ( | vfs | , |
namei | , | ||
lookup | , | ||
return | |||
) |
SDT_PROBE_DEFINE1 | ( | vfs | , |
namecache | , | ||
fullpath | , | ||
entry | , | ||
"struct vnode *" | |||
) |
SDT_PROBE_DEFINE1 | ( | vfs | , |
namecache | , | ||
fullpath | , | ||
miss | , | ||
"struct vnode *" | |||
) |
SDT_PROBE_DEFINE1 | ( | vfs | , |
namecache | , | ||
purge | , | ||
batch | , | ||
"int" | |||
) |
SDT_PROBE_DEFINE1 | ( | vfs | , |
namecache | , | ||
purge_negative | , | ||
done | , | ||
"struct vnode *" | |||
) |
SDT_PROBE_DEFINE1 | ( | vfs | , |
namecache | , | ||
purgevfs | , | ||
done | , | ||
"struct mount *" | |||
) |
SDT_PROBE_DEFINE1 | ( | vfs | , |
namecache | , | ||
symlink | , | ||
alloc__fail | , | ||
"size_t" | |||
) |
SDT_PROBE_DEFINE2 | ( | vfs | , |
namecache | , | ||
enter_negative | , | ||
done | , | ||
"struct vnode *" | , | ||
"char *" | |||
) |
SDT_PROBE_DEFINE2 | ( | vfs | , |
namecache | , | ||
evict_negative | , | ||
done | , | ||
"struct vnode *" | , | ||
"char *" | |||
) |
SDT_PROBE_DEFINE2 | ( | vfs | , |
namecache | , | ||
fullpath_smr | , | ||
hit | , | ||
"struct vnode *" | , | ||
"const 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 | , | ||
removecnp | , | ||
hit | , | ||
"struct vnode *" | , | ||
"struct componentname *" | |||
) |
SDT_PROBE_DEFINE2 | ( | vfs | , |
namecache | , | ||
removecnp | , | ||
miss | , | ||
"struct vnode *" | , | ||
"struct componentname *" | |||
) |
SDT_PROBE_DEFINE2 | ( | vfs | , |
namecache | , | ||
zap_negative | , | ||
done | , | ||
"struct vnode *" | , | ||
"char *" | |||
) |
SDT_PROBE_DEFINE3 | ( | vfs | , |
fplookup | , | ||
lookup | , | ||
done | , | ||
"struct nameidata" | , | ||
"int" | , | ||
"bool" | |||
) |
SDT_PROBE_DEFINE3 | ( | vfs | , |
namecache | , | ||
enter | , | ||
done | , | ||
"struct vnode *" | , | ||
"char *" | , | ||
"struct vnode *" | |||
) |
SDT_PROBE_DEFINE3 | ( | vfs | , |
namecache | , | ||
enter | , | ||
duplicate | , | ||
"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 | , | ||
purge | , | ||
done | , | ||
"struct vnode *" | , | ||
"size_t" | , | ||
"size_t" | |||
) |
SDT_PROBE_DEFINE3 | ( | vfs | , |
namecache | , | ||
zap | , | ||
done | , | ||
"struct vnode *" | , | ||
"char *" | , | ||
"struct vnode *" | |||
) |
SDT_PROBE_DEFINE4 | ( | vfs | , |
namecache | , | ||
fullpath_smr | , | ||
miss | , | ||
"struct vnode *" | , | ||
"struct namecache *" | , | ||
"int" | , | ||
"int" | |||
) |
SDT_PROVIDER_DECLARE | ( | vfs | ) |
STATNODE_COUNTER | ( | dotdothis | , |
dotdothits | , | ||
"Number of '..' hits" | |||
) |
STATNODE_COUNTER | ( | dothits | , |
dothits | , | ||
"Number of '.' hits" | |||
) |
STATNODE_COUNTER | ( | drops | , |
numdrops | , | ||
"Number of dropped entries due to reaching the limit" | |||
) |
STATNODE_COUNTER | ( | fullpathcalls | , |
numfullpathcalls | , | ||
"Number of fullpath search calls" | |||
) |
STATNODE_COUNTER | ( | fullpathfail1 | , |
numfullpathfail1 | , | ||
"Number of fullpath search errors (ENOTDIR)" | |||
) |
STATNODE_COUNTER | ( | fullpathfail2 | , |
numfullpathfail2 | , | ||
"Number of fullpath search errors (VOP_VPTOCNP failures)" | |||
) |
STATNODE_COUNTER | ( | fullpathfail4 | , |
numfullpathfail4 | , | ||
"Number of fullpath search errors (ENOMEM)" | |||
) |
STATNODE_COUNTER | ( | fullpathfound | , |
numfullpathfound | , | ||
"Number of successful fullpath calls" | |||
) |
STATNODE_COUNTER | ( | heldvnodes | , |
numcachehv | , | ||
"Number of namecache entries with vnodes held" | |||
) |
STATNODE_COUNTER | ( | miss | , |
nummiss | , | ||
"Number of cache misses" | |||
) |
STATNODE_COUNTER | ( | misszap | , |
nummisszap | , | ||
"Number of cache misses we do not want to cache" | |||
) |
STATNODE_COUNTER | ( | neghits | , |
numneghits | , | ||
"Number of cache hits (negative)" | |||
) |
STATNODE_COUNTER | ( | negzaps | , |
numnegzaps | , | ||
"Number of cache hits (negative) we do not want to cache" | |||
) |
STATNODE_COUNTER | ( | poshits | , |
numposhits | , | ||
"Number of cache hits (positive)" | |||
) |
STATNODE_COUNTER | ( | posszaps | , |
numposzaps | , | ||
"Number of cache hits (positive) we do not want to cache" | |||
) |
STATNODE_COUNTER | ( | symlinktoobig | , |
symlinktoobig | , | ||
"Number of times symlink did not fit the cache" | |||
) |
STATNODE_ULONG | ( | count | , |
numcache | , | ||
"Number of cache entries" | |||
) |
STATNODE_ULONG | ( | neg | , |
numneg | , | ||
"Number of negative cache entries" | |||
) |
int sys___getcwd | ( | struct thread * | td, |
struct __getcwd_args * | uap | ||
) |
Definition at line 3077 of file vfs_cache.c.
References buf, namei_zone, and vn_getcwd().
int sys___realpathat | ( | struct thread * | td, |
struct __realpathat_args * | uap | ||
) |
Definition at line 3158 of file vfs_cache.c.
References kern___realpathat().
|
static |
Definition at line 3887 of file vfs_cache.c.
References cache_fast_lookup, cache_fast_lookup_enabled_recalc(), and sysctl_handle_int().
SYSCTL_COUNTER_U64 | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
created | , | ||
CTLFLAG_RD | , | ||
& | neg_created, | ||
"Number of created negative entries" | |||
) |
SYSCTL_COUNTER_U64 | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
evict_skipped_contended | , | ||
CTLFLAG_RD | , | ||
& | neg_evict_skipped_contended, | ||
"Number of times evicting failed due to contention" | |||
) |
SYSCTL_COUNTER_U64 | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
evict_skipped_empty | , | ||
CTLFLAG_RD | , | ||
& | neg_evict_skipped_empty, | ||
"Number of times evicting failed due to lack of entries" | |||
) |
SYSCTL_COUNTER_U64 | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
evict_skipped_missed | , | ||
CTLFLAG_RD | , | ||
& | neg_evict_skipped_missed, | ||
"Number of times evicting failed due to target entry disappearing" | |||
) |
SYSCTL_COUNTER_U64 | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
evicted | , | ||
CTLFLAG_RD | , | ||
& | neg_evicted, | ||
"Number of evicted negative entries" | |||
) |
SYSCTL_COUNTER_U64 | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
hits | , | ||
CTLFLAG_RD | , | ||
& | numneghits, | ||
"Number of cache hits (negative)" | |||
) |
SYSCTL_INT | ( | _debug_sizeof | , |
OID_AUTO | , | ||
namecache | , | ||
CTLFLAG_RD | , | ||
SYSCTL_NULL_INT_PTR | , | ||
sizeof(struct namecache) | , | ||
"sizeof(struct namecache)" | |||
) |
|
static |
Definition at line 980 of file vfs_cache.c.
References counter_u64_fetch().
|
static |
Definition at line 1172 of file vfs_cache.c.
References neglists, and numneglists.
|
static |
Definition at line 1009 of file vfs_cache.c.
References cache_recalc_neg_min(), ncnegminpct, and sysctl_handle_int().
|
static |
|
static |
|
static |
|
static |
|
static |
SYSCTL_PROC | ( | _vfs | , |
OID_AUTO | , | ||
cache_fast_lookup | , | ||
CTLTYPE_INT|CTLFLAG_RW| | CTLFLAG_MPSAFE, | ||
& | cache_fast_lookup, | ||
0 | , | ||
syscal_vfs_cache_fast_lookup | , | ||
"IU" | , | ||
"" | |||
) |
SYSCTL_PROC | ( | _vfs_cache | , |
OID_AUTO | , | ||
nchstats | , | ||
CTLTYPE_OPAQUE|CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
0 | , | ||
0 | , | ||
sysctl_nchstats | , | ||
"LU" | , | ||
"VFS cache effectiveness statistics" | |||
) |
SYSCTL_PROC | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
hot | , | ||
CTLTYPE_INT|CTLFLAG_RD| | CTLFLAG_MPSAFE, | ||
0 | , | ||
0 | , | ||
sysctl_neg_hot | , | ||
"I" | , | ||
"Number of hot negative entries" | |||
) |
SYSCTL_PROC | ( | _vfs_cache_param | , |
OID_AUTO | , | ||
negminpct | , | ||
CTLTYPE_INT|CTLFLAG_MPSAFE| | CTLFLAG_RW, | ||
NULL | , | ||
0 | , | ||
sysctl_negminpct | , | ||
"I" | , | ||
"Negative entry \% of namecache capacity above which automatic eviction is allowed" | |||
) |
SYSCTL_UINT | ( | _vfs_cache_param | , |
OID_AUTO | , | ||
negmin | , | ||
CTLFLAG_RD | , | ||
& | neg_min, | ||
0 | , | ||
"Negative entry count above which automatic eviction is allowed" | |||
) |
SYSCTL_UINT | ( | _vfs_cache_param | , |
OID_AUTO | , | ||
size | , | ||
CTLFLAG_RW | , | ||
& | ncsize, | ||
0 | , | ||
"Total namecache capacity" | |||
) |
SYSCTL_UINT | ( | _vfs_cache_param | , |
OID_AUTO | , | ||
sizefactor | , | ||
CTLFLAG_RW | , | ||
& | ncsizefactor, | ||
0 | , | ||
"Size factor for namecache" | |||
) |
SYSCTL_ULONG | ( | _vfs_cache_neg | , |
OID_AUTO | , | ||
count | , | ||
CTLFLAG_RD | , | ||
& | numneg, | ||
0 | , | ||
"Number of negative cache entries" | |||
) |
SYSCTL_ULONG | ( | _vfs_cache_param | , |
OID_AUTO | , | ||
negfactor | , | ||
CTLFLAG_RW | , | ||
& | ncnegfactor, | ||
0 | , | ||
"Ratio of negative namecache entries" | |||
) |
SYSINIT | ( | vfs | , |
SI_SUB_VFS | , | ||
SI_ORDER_SECOND | , | ||
nchinit | , | ||
NULL | |||
) |
TAILQ_HEAD | ( | cache_freebatch | , |
namecache | |||
) |
int vfs_cache_lookup | ( | struct vop_lookup_args * | ap | ) |
Definition at line 3045 of file vfs_cache.c.
References cache_lookup(), flags, and vn_dir_check_exec().
int vn_commname | ( | struct vnode * | vp, |
char * | buf, | ||
u_int | buflen | ||
) |
Definition at line 3726 of file vfs_cache.c.
References buf, mtx, namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_ISDOTDOT, and VP2VNODELOCK().
Referenced by do_execve().
|
static |
Definition at line 3229 of file vfs_cache.c.
References cache_assert_vnode_locked(), namecache::nc_flag, and NCF_ISDOTDOT.
Referenced by vn_vptocnp().
struct vnode * vn_dir_dd_ino | ( | struct vnode * | vp | ) |
Definition at line 3701 of file vfs_cache.c.
References mtx, namecache::nc_flag, NCF_ISDOTDOT, vget_finish(), vget_prep(), and VP2VNODELOCK().
int vn_fullpath | ( | struct vnode * | vp, |
char ** | retbuf, | ||
char ** | freebuf | ||
) |
Definition at line 3170 of file vfs_cache.c.
References buf, free(), malloc(), pwd_drop(), pwd_hold(), vn_fullpath_any(), and vn_fullpath_any_smr().
Referenced by do_execve(), kern_proc_vmmap_out(), proc_get_binpath(), ptrace_vm_entry(), and vn_fill_kinfo_vnode().
|
static |
Definition at line 3575 of file vfs_cache.c.
References buf, vn_fullpath_dir(), vn_vptocnp(), vref(), and vrele().
Referenced by vn_fullpath(), vn_fullpath_global(), and vn_getcwd().
|
static |
Definition at line 3439 of file vfs_cache.c.
References buf, cache_fast_lookup_enabled, cache_ncp_canuse, cache_rev_failed, namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_ISDOTDOT, and rootvnode.
Referenced by vn_fullpath(), vn_fullpath_global(), vn_fullpath_hardlink(), and vn_getcwd().
|
static |
Definition at line 3317 of file vfs_cache.c.
References buf, rootvnode, vn_vptocnp(), vput(), vref(), and vrele().
Referenced by vn_fullpath_any(), and vn_fullpath_hardlink().
int vn_fullpath_global | ( | struct vnode * | vp, |
char ** | retbuf, | ||
char ** | freebuf | ||
) |
Definition at line 3205 of file vfs_cache.c.
References buf, free(), malloc(), rootvnode, vn_fullpath_any(), and vn_fullpath_any_smr().
Referenced by coredump(), and vn_path_to_global_path().
int vn_fullpath_hardlink | ( | struct vnode * | vp, |
struct vnode * | dvp, | ||
const char * | hrdl_name, | ||
size_t | hrdl_name_length, | ||
char ** | retbuf, | ||
char ** | freebuf, | ||
size_t * | buflen | ||
) |
Definition at line 3620 of file vfs_cache.c.
References buf, free(), malloc(), pwd_drop(), pwd_hold(), type, vn_fullpath_any_smr(), vn_fullpath_dir(), and vref().
Referenced by do_execve(), kern___realpathat(), and proc_get_binpath().
int vn_getcwd | ( | char * | buf, |
char ** | retbuf, | ||
size_t * | buflen | ||
) |
Definition at line 3098 of file vfs_cache.c.
References buf, pwd_drop(), pwd_hold(), vn_fullpath_any(), and vn_fullpath_any_smr().
Referenced by coredump(), and sys___getcwd().
int vn_path_to_global_path | ( | struct thread * | td, |
struct vnode * | vp, | ||
char * | path, | ||
u_int | pathlen | ||
) |
Definition at line 3759 of file vfs_cache.c.
References free(), namei(), NDFREE(), path, vn_fullpath_global(), vput(), and vrele().
Referenced by kern_jail_set(), kern_unmount(), and vfs_domount().
int vn_vptocnp | ( | struct vnode ** | vp, |
char * | buf, | ||
size_t * | buflen | ||
) |
Definition at line 3242 of file vfs_cache.c.
References buf, mtx, namecache::nc_flag, namecache::nc_name, namecache::nc_nlen, NCF_ISDOTDOT, vn_dd_from_dst(), VP2VNODELOCK(), vput(), vref(), and vrele().
Referenced by vn_fullpath_any(), and vn_fullpath_dir().
|
inlinestatic |
Definition at line 492 of file vfs_cache.c.
References ncvnodehash, and vnodelocks.
Referenced by cache_assert_vnode_locked(), cache_enter_lock(), cache_enter_lock_dd(), cache_lock_vnodes_cel(), cache_lock_vnodes_cel_3(), cache_lookup_dotdot(), cache_neg_evict(), cache_purge_impl(), cache_purge_negative(), cache_purge_vgone(), cache_remove_cnp(), cache_zap_locked_bucket(), cache_zap_locked_vnode_kl2(), vn_commname(), vn_dir_dd_ino(), and vn_vptocnp().
|
static |
Definition at line 484 of file vfs_cache.c.
Referenced by cache_lock_all_buckets(), cache_unlock_all_buckets(), and nchinit().
|
static |
Definition at line 3861 of file vfs_cache.c.
Referenced by cache_fast_lookup_enabled_recalc(), and syscal_vfs_cache_fast_lookup().
|
static |
Definition at line 256 of file vfs_cache.c.
Referenced by cache_can_fplookup(), cache_fast_lookup_enabled_recalc(), and vn_fullpath_any_smr().
|
static |
Definition at line 577 of file vfs_cache.c.
Referenced by cache_lock_vnodes_cel_3().
|
static |
Definition at line 643 of file vfs_cache.c.
Referenced by cache_alloc_uma(), cache_free_uma(), cache_symlink_alloc(), cache_symlink_free(), and nchinit().
|
static |
Definition at line 644 of file vfs_cache.c.
Referenced by cache_alloc_uma(), cache_free_uma(), and nchinit().
|
static |
Definition at line 641 of file vfs_cache.c.
Referenced by cache_alloc_uma(), cache_free_uma(), cache_symlink_alloc(), cache_symlink_free(), and nchinit().
|
static |
Definition at line 642 of file vfs_cache.c.
Referenced by cache_alloc_uma(), cache_free_uma(), and nchinit().
|
static |
Definition at line 483 of file vfs_cache.c.
Referenced by nchinit().
|
static |
Definition at line 419 of file vfs_cache.c.
Referenced by cache_neg_evict_cond().
|
static |
Definition at line 428 of file vfs_cache.c.
Referenced by cache_changesize(), nchinit(), and sysctl_negminpct().
|
static |
Definition at line 411 of file vfs_cache.c.
Referenced by cache_alloc(), cache_changesize(), cache_neg_evict_cond(), cache_recalc_neg_min(), and nchinit().
u_int ncsizefactor = 2 |
Definition at line 415 of file vfs_cache.c.
Referenced by cache_changesize(), nchinit(), and vntblinit().
|
static |
Definition at line 489 of file vfs_cache.c.
Referenced by nchinit(), and VP2VNODELOCK().
|
static |
Definition at line 430 of file vfs_cache.c.
Referenced by cache_neg_evict_cond(), and cache_recalc_neg_min().
|
static |
Definition at line 465 of file vfs_cache.c.
Referenced by cache_neg_evict_select_list(), nchinit(), NCP2NEGLIST(), and sysctl_neg_hot().
VFS_SMR_DECLARE |
Definition at line 406 of file vfs_cache.c.
|
static |
Definition at line 490 of file vfs_cache.c.
Referenced by cache_lock_all_vnodes(), cache_unlock_all_vnodes(), nchinit(), and VP2VNODELOCK().
|
static |
Definition at line 573 of file vfs_cache.c.
Referenced by cache_remove_cnp().
|
static |
Definition at line 575 of file vfs_cache.c.
Referenced by cache_lookup_fallback().