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

Function abd_put

freebsd/contrib/openzfs/module/zfs/abd.c:222–241  ·  view source on GitHub ↗

* Free an ABD allocated from abd_get_offset() or abd_get_from_buf(). Will not * free the underlying scatterlist or buffer. */

Source from the content-addressed store, hash-verified

220 * free the underlying scatterlist or buffer.
221 */
222void
223abd_put(abd_t *abd)
224{
225 if (abd == NULL)
226 return;
227
228 abd_verify(abd);
229 ASSERT(!(abd->abd_flags & ABD_FLAG_OWNER));
230
231 if (abd->abd_parent != NULL) {
232 (void) zfs_refcount_remove_many(&abd->abd_parent->abd_children,
233 abd->abd_size, abd);
234 }
235
236 if (abd_is_gang(abd))
237 abd_put_gang_abd(abd);
238
239 zfs_refcount_destroy(&abd->abd_children);
240 abd_free_struct(abd);
241}
242
243/*
244 * Allocate an ABD that must be linear, along with its own underlying data

Callers 15

vdev_raidz_row_freeFunction · 0.85
vdev_raidz_cksum_finishFunction · 0.85
vdev_raidz_cksum_reportFunction · 0.85
abd_put_gang_abdFunction · 0.85
abd_free_gang_abdFunction · 0.85
arc_unshare_bufFunction · 0.85
arc_write_doneFunction · 0.85
l2arc_blk_fetch_doneFunction · 0.85
l2arc_dev_hdr_readFunction · 0.85
l2arc_dev_hdr_updateFunction · 0.85
l2arc_log_blk_commitFunction · 0.85
dbuf_write_override_doneFunction · 0.85

Calls 6

abd_verifyFunction · 0.85
zfs_refcount_remove_manyFunction · 0.85
abd_is_gangFunction · 0.85
abd_put_gang_abdFunction · 0.85
zfs_refcount_destroyFunction · 0.85
abd_free_structFunction · 0.50

Tested by

no test coverage detected