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

Function ztest_bt_bonus

freebsd/contrib/openzfs/cmd/ztest/ztest.c:1672–1684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1670}
1671
1672static ztest_block_tag_t *
1673ztest_bt_bonus(dmu_buf_t *db)
1674{
1675 dmu_object_info_t doi;
1676 ztest_block_tag_t *bt;
1677
1678 dmu_object_info_from_db(db, &doi);
1679 ASSERT3U(doi.doi_bonus_size, <=, db->db_size);
1680 ASSERT3U(doi.doi_bonus_size, >=, sizeof (*bt));
1681 bt = (void *)((char *)db->db_data + doi.doi_bonus_size - sizeof (*bt));
1682
1683 return (bt);
1684}
1685
1686/*
1687 * Generate a token to fill up unused bonus buffer space. Try to make

Callers 6

ztest_replay_createFunction · 0.85
ztest_replay_writeFunction · 0.85
ztest_replay_setattrFunction · 0.85
ztest_get_dataFunction · 0.85
ztest_lookupFunction · 0.85
ztest_verify_dnode_btFunction · 0.85

Calls 1

dmu_object_info_from_dbFunction · 0.85

Tested by

no test coverage detected