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

Function arc_buf_is_shared

freebsd/contrib/openzfs/module/zfs/arc.c:1403–1420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1401}
1402
1403static inline boolean_t
1404arc_buf_is_shared(arc_buf_t *buf)
1405{
1406 boolean_t shared = (buf->b_data != NULL &&
1407 buf->b_hdr->b_l1hdr.b_pabd != NULL &&
1408 abd_is_linear(buf->b_hdr->b_l1hdr.b_pabd) &&
1409 buf->b_data == abd_to_buf(buf->b_hdr->b_l1hdr.b_pabd));
1410 IMPLY(shared, HDR_SHARED_DATA(buf->b_hdr));
1411 IMPLY(shared, ARC_BUF_SHARED(buf));
1412 IMPLY(shared, ARC_BUF_COMPRESSED(buf) || ARC_BUF_LAST(buf));
1413
1414 /*
1415 * It would be nice to assert arc_can_share() too, but the "hdr isn't
1416 * already being shared" requirement prevents us from doing that.
1417 */
1418
1419 return (shared);
1420}
1421
1422/*
1423 * Free the checksum associated with this header. If there is no checksum, this

Callers 10

arc_buf_fillFunction · 0.85
arc_change_stateFunction · 0.85
arc_unshare_bufFunction · 0.85
arc_buf_destroy_implFunction · 0.85
arc_alloc_compressed_bufFunction · 0.85
arc_releaseFunction · 0.85
arc_write_readyFunction · 0.85
arc_writeFunction · 0.85

Calls 2

abd_is_linearFunction · 0.85
abd_to_bufFunction · 0.85

Tested by

no test coverage detected