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

Function cache_free_batch

freebsd/kern/vfs_cache.c:686–705  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684}
685
686static void
687cache_free_batch(struct cache_freebatch *batch)
688{
689 struct namecache *ncp, *nnp;
690 int i;
691
692 i = 0;
693 if (TAILQ_EMPTY(batch))
694 goto out;
695 TAILQ_FOREACH_SAFE(ncp, batch, nc_dst, nnp) {
696 if ((ncp->nc_flag & NCF_DVDROP) != 0) {
697 cache_drop_vnode(ncp->nc_dvp);
698 }
699 cache_free_uma(ncp);
700 i++;
701 }
702 atomic_subtract_long(&numcache, i);
703out:
704 SDT_PROBE1(vfs, namecache, purge, batch, i);
705}
706
707/*
708 * TODO: With the value stored we can do better than computing the hash based

Callers 2

cache_purge_implFunction · 0.85
cache_purge_negativeFunction · 0.85

Calls 3

cache_drop_vnodeFunction · 0.85
cache_free_umaFunction · 0.85
atomic_subtract_longFunction · 0.85

Tested by

no test coverage detected