* 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 */
| 5641 | */ |
| 5642 | /* ARGSUSED */ |
| 5643 | void |
| 5644 | ztest_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 */ |
| 5678 | void |
nothing calls this directly
no test coverage detected