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

Function vdev_cache_evict

freebsd/contrib/openzfs/module/zfs/vdev_cache.c:136–147  ·  view source on GitHub ↗

* Evict the specified entry from the cache. */

Source from the content-addressed store, hash-verified

134 * Evict the specified entry from the cache.
135 */
136static void
137vdev_cache_evict(vdev_cache_t *vc, vdev_cache_entry_t *ve)
138{
139 ASSERT(MUTEX_HELD(&vc->vc_lock));
140 ASSERT3P(ve->ve_fill_io, ==, NULL);
141 ASSERT3P(ve->ve_abd, !=, NULL);
142
143 avl_remove(&vc->vc_lastused_tree, ve);
144 avl_remove(&vc->vc_offset_tree, ve);
145 abd_free(ve->ve_abd);
146 kmem_free(ve, sizeof (vdev_cache_entry_t));
147}
148
149/*
150 * Allocate an entry in the cache. At the point we don't have the data,

Callers 3

vdev_cache_allocateFunction · 0.85
vdev_cache_fillFunction · 0.85
vdev_cache_purgeFunction · 0.85

Calls 3

avl_removeFunction · 0.85
abd_freeFunction · 0.85
kmem_freeFunction · 0.50

Tested by

no test coverage detected