MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cache_hold_vnode

Function cache_hold_vnode

freebsd/kern/vfs_cache.c:541–549  ·  view source on GitHub ↗

* Directory vnodes with entries are held for two reasons: * 1. make them less of a target for reclamation in vnlru * 2. suffer smaller performance penalty in locked lookup as requeieing is avoided * * It will be feasible to stop doing it altogether if all filesystems start * supporting lockless lookup. */

Source from the content-addressed store, hash-verified

539 * supporting lockless lookup.
540 */
541static void
542cache_hold_vnode(struct vnode *vp)
543{
544
545 cache_assert_vnode_locked(vp);
546 VNPASS(LIST_EMPTY(&vp->v_cache_src), vp);
547 vhold(vp);
548 counter_u64_add(numcachehv, 1);
549}
550
551static void
552cache_drop_vnode(struct vnode *vp)

Callers 1

cache_enter_timeFunction · 0.85

Calls 3

vholdFunction · 0.85
counter_u64_addFunction · 0.50

Tested by

no test coverage detected