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

Function ztest_verify_dnode_bt

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

* Visit each object in the dataset. Verify that its properties * are consistent what was stored in the block tag when it was created, * and that its unused bonus buffer space has not been overwritten. */ ARGSUSED */

Source from the content-addressed store, hash-verified

5641 */
5642/* ARGSUSED */
5643void
5644ztest_verify_dnode_bt(ztest_ds_t *zd, uint64_t id)
5645{
5646 objset_t *os = zd->zd_os;
5647 uint64_t obj;
5648 int err = 0;
5649
5650 for (obj = 0; err == 0; err = dmu_object_next(os, &obj, FALSE, 0)) {
5651 ztest_block_tag_t *bt = NULL;
5652 dmu_object_info_t doi;
5653 dmu_buf_t *db;
5654
5655 ztest_object_lock(zd, obj, RL_READER);
5656 if (dmu_bonus_hold(os, obj, FTAG, &db) != 0) {
5657 ztest_object_unlock(zd, obj);
5658 continue;
5659 }
5660
5661 dmu_object_info_from_db(db, &doi);
5662 if (doi.doi_bonus_size >= sizeof (*bt))
5663 bt = ztest_bt_bonus(db);
5664
5665 if (bt && bt->bt_magic == BT_MAGIC) {
5666 ztest_bt_verify(bt, os, obj, doi.doi_dnodesize,
5667 bt->bt_offset, bt->bt_gen, bt->bt_txg,
5668 bt->bt_crtxg);
5669 ztest_verify_unused_bonus(db, bt, obj, os, bt->bt_gen);
5670 }
5671
5672 dmu_buf_rele(db, FTAG);
5673 ztest_object_unlock(zd, obj);
5674 }
5675}
5676
5677/* ARGSUSED */
5678void

Callers

nothing calls this directly

Calls 9

dmu_object_nextFunction · 0.85
ztest_object_lockFunction · 0.85
dmu_bonus_holdFunction · 0.85
ztest_object_unlockFunction · 0.85
dmu_object_info_from_dbFunction · 0.85
ztest_bt_bonusFunction · 0.85
ztest_bt_verifyFunction · 0.85
dmu_buf_releFunction · 0.85

Tested by

no test coverage detected