Lines Matching full:od

2601 ztest_lookup(ztest_ds_t *zd, ztest_od_t *od, int count)  in ztest_lookup()  argument
2609 for (i = 0; i < count; i++, od++) { in ztest_lookup()
2610 od->od_object = 0; in ztest_lookup()
2611 error = zap_lookup(zd->zd_os, od->od_dir, od->od_name, in ztest_lookup()
2612 sizeof (uint64_t), 1, &od->od_object); in ztest_lookup()
2615 ASSERT0(od->od_object); in ztest_lookup()
2622 ASSERT3U(od->od_object, !=, 0); in ztest_lookup()
2625 ztest_object_lock(zd, od->od_object, ZTRL_READER); in ztest_lookup()
2626 VERIFY0(dmu_bonus_hold(zd->zd_os, od->od_object, in ztest_lookup()
2631 od->od_type = doi.doi_type; in ztest_lookup()
2632 od->od_blocksize = doi.doi_data_block_size; in ztest_lookup()
2633 od->od_gen = bbt->bt_gen; in ztest_lookup()
2635 ztest_object_unlock(zd, od->od_object); in ztest_lookup()
2643 ztest_create(ztest_ds_t *zd, ztest_od_t *od, int count) in ztest_create() argument
2650 for (i = 0; i < count; i++, od++) { in ztest_create()
2652 od->od_object = 0; in ztest_create()
2657 lr_create_t *lrc = ztest_lr_alloc(sizeof (*lrc), od->od_name); in ztest_create()
2660 lr->lr_doid = od->od_dir; in ztest_create()
2662 lr->lrz_type = od->od_crtype; in ztest_create()
2663 lr->lrz_blocksize = od->od_crblocksize; in ztest_create()
2666 lr->lrz_dnodesize = od->od_crdnodesize; in ztest_create()
2667 lr->lr_gen = od->od_crgen; in ztest_create()
2672 od->od_object = 0; in ztest_create()
2675 od->od_object = lr->lr_foid; in ztest_create()
2676 od->od_type = od->od_crtype; in ztest_create()
2677 od->od_blocksize = od->od_crblocksize; in ztest_create()
2678 od->od_gen = od->od_crgen; in ztest_create()
2679 ASSERT3U(od->od_object, !=, 0); in ztest_create()
2682 ztest_lr_free(lr, sizeof (*lr), od->od_name); in ztest_create()
2689 ztest_remove(ztest_ds_t *zd, ztest_od_t *od, int count) in ztest_remove() argument
2697 od += count - 1; in ztest_remove()
2699 for (i = count - 1; i >= 0; i--, od--) { in ztest_remove()
2708 if (od->od_object == 0) in ztest_remove()
2711 lr_remove_t *lr = ztest_lr_alloc(sizeof (*lr), od->od_name); in ztest_remove()
2713 lr->lr_doid = od->od_dir; in ztest_remove()
2719 od->od_object = 0; in ztest_remove()
2721 ztest_lr_free(lr, sizeof (*lr), od->od_name); in ztest_remove()
2916 ztest_od_init(ztest_od_t *od, uint64_t id, const char *tag, uint64_t index, in ztest_od_init() argument
2920 od->od_dir = ZTEST_DIROBJ; in ztest_od_init()
2921 od->od_object = 0; in ztest_od_init()
2923 od->od_crtype = type; in ztest_od_init()
2924 od->od_crblocksize = blocksize ? blocksize : ztest_random_blocksize(); in ztest_od_init()
2925 od->od_crdnodesize = dnodesize ? dnodesize : ztest_random_dnodesize(); in ztest_od_init()
2926 od->od_crgen = gen; in ztest_od_init()
2928 od->od_type = DMU_OT_NONE; in ztest_od_init()
2929 od->od_blocksize = 0; in ztest_od_init()
2930 od->od_gen = 0; in ztest_od_init()
2932 (void) snprintf(od->od_name, sizeof (od->od_name), in ztest_od_init()
2938 * Lookup or create the objects for a test using the od template.
2944 ztest_object_init(ztest_ds_t *zd, ztest_od_t *od, size_t size, boolean_t remove) in ztest_object_init() argument
2946 int count = size / sizeof (*od); in ztest_object_init()
2950 if ((ztest_lookup(zd, od, count) != 0 || remove) && in ztest_object_init()
2951 (ztest_remove(zd, od, count) != 0 || in ztest_object_init()
2952 ztest_create(zd, od, count) != 0)) in ztest_object_init()
2954 zd->zd_od = od; in ztest_object_init()
4991 ztest_od_t *od; in ztest_dmu_object_alloc_free() local
4997 od = umem_alloc(size, UMEM_NOFAIL); in ztest_dmu_object_alloc_free()
5001 ztest_od_init(od + b, id, FTAG, b, DMU_OT_UINT64_OTHER, in ztest_dmu_object_alloc_free()
5008 if (ztest_object_init(zd, od, size, B_TRUE) != 0) { in ztest_dmu_object_alloc_free()
5010 umem_free(od, size); in ztest_dmu_object_alloc_free()
5015 ztest_io(zd, od[ztest_random(batchsize)].od_object, in ztest_dmu_object_alloc_free()
5018 umem_free(od, size); in ztest_dmu_object_alloc_free()
5053 ztest_od_t *od; in ztest_dmu_read_write() local
5057 od = umem_alloc(size, UMEM_NOFAIL); in ztest_dmu_read_write()
5103 ztest_od_init(od, id, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, chunksize); in ztest_dmu_read_write()
5104 ztest_od_init(od + 1, id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, in ztest_dmu_read_write()
5107 if (ztest_object_init(zd, od, size, B_FALSE) != 0) { in ztest_dmu_read_write()
5108 umem_free(od, size); in ztest_dmu_read_write()
5112 bigobj = od[0].od_object; in ztest_dmu_read_write()
5113 packobj = od[1].od_object; in ztest_dmu_read_write()
5114 chunksize = od[0].od_gen; in ztest_dmu_read_write()
5115 ASSERT3U(chunksize, ==, od[1].od_gen); in ztest_dmu_read_write()
5178 umem_free(od, size); in ztest_dmu_read_write()
5287 umem_free(od, size); in ztest_dmu_read_write()
5350 ztest_od_t *od; in ztest_dmu_read_write_zcopy() local
5375 od = umem_alloc(size, UMEM_NOFAIL); in ztest_dmu_read_write_zcopy()
5396 ztest_od_init(od, id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); in ztest_dmu_read_write_zcopy()
5397 ztest_od_init(od + 1, id, FTAG, 1, DMU_OT_UINT64_OTHER, 0, 0, in ztest_dmu_read_write_zcopy()
5401 if (ztest_object_init(zd, od, size, B_FALSE) != 0) { in ztest_dmu_read_write_zcopy()
5402 umem_free(od, size); in ztest_dmu_read_write_zcopy()
5406 bigobj = od[0].od_object; in ztest_dmu_read_write_zcopy()
5407 packobj = od[1].od_object; in ztest_dmu_read_write_zcopy()
5408 blocksize = od[0].od_blocksize; in ztest_dmu_read_write_zcopy()
5410 ASSERT3U(chunksize, ==, od[1].od_gen); in ztest_dmu_read_write_zcopy()
5491 umem_free(od, size); in ztest_dmu_read_write_zcopy()
5587 umem_free(od, size); in ztest_dmu_read_write_zcopy()
5594 ztest_od_t *od; in ztest_dmu_write_parallel() local
5596 od = umem_alloc(sizeof (ztest_od_t), UMEM_NOFAIL); in ztest_dmu_write_parallel()
5605 ztest_od_init(od, ID_PARALLEL, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, 0); in ztest_dmu_write_parallel()
5607 if (ztest_object_init(zd, od, sizeof (ztest_od_t), B_FALSE) != 0) in ztest_dmu_write_parallel()
5611 ztest_io(zd, od->od_object, offset); in ztest_dmu_write_parallel()
5613 umem_free(od, sizeof (ztest_od_t)); in ztest_dmu_write_parallel()
5619 ztest_od_t *od; in ztest_dmu_prealloc() local
5626 od = umem_alloc(sizeof (ztest_od_t), UMEM_NOFAIL); in ztest_dmu_prealloc()
5628 ztest_od_init(od, id, FTAG, 0, DMU_OT_UINT64_OTHER, blocksize, 0, 0); in ztest_dmu_prealloc()
5630 if (ztest_object_init(zd, od, sizeof (ztest_od_t), in ztest_dmu_prealloc()
5632 umem_free(od, sizeof (ztest_od_t)); in ztest_dmu_prealloc()
5636 if (ztest_truncate(zd, od->od_object, offset, count * blocksize) != 0) { in ztest_dmu_prealloc()
5637 umem_free(od, sizeof (ztest_od_t)); in ztest_dmu_prealloc()
5641 ztest_prealloc(zd, od->od_object, offset, count * blocksize); in ztest_dmu_prealloc()
5647 if (ztest_write(zd, od->od_object, randoff, blocksize, in ztest_dmu_prealloc()
5651 ztest_io(zd, od->od_object, randoff); in ztest_dmu_prealloc()
5655 umem_free(od, sizeof (ztest_od_t)); in ztest_dmu_prealloc()
5669 ztest_od_t *od; in ztest_zap() local
5680 od = umem_alloc(sizeof (ztest_od_t), UMEM_NOFAIL); in ztest_zap()
5681 ztest_od_init(od, id, FTAG, 0, DMU_OT_ZAP_OTHER, 0, 0, 0); in ztest_zap()
5683 if (ztest_object_init(zd, od, sizeof (ztest_od_t), in ztest_zap()
5687 object = od->od_object; in ztest_zap()
5804 umem_free(od, sizeof (ztest_od_t)); in ztest_zap()
5814 ztest_od_t *od; in ztest_fzap() local
5817 od = umem_alloc(sizeof (ztest_od_t), UMEM_NOFAIL); in ztest_fzap()
5818 ztest_od_init(od, id, FTAG, 0, DMU_OT_ZAP_OTHER, 0, 0, 0); in ztest_fzap()
5820 if (ztest_object_init(zd, od, sizeof (ztest_od_t), in ztest_fzap()
5823 object = od->od_object; in ztest_fzap()
5849 umem_free(od, sizeof (ztest_od_t)); in ztest_fzap()
5857 ztest_od_t *od; in ztest_zap_parallel() local
5865 od = umem_alloc(sizeof (ztest_od_t), UMEM_NOFAIL); in ztest_zap_parallel()
5866 ztest_od_init(od, ID_PARALLEL, FTAG, micro, DMU_OT_ZAP_OTHER, 0, 0, 0); in ztest_zap_parallel()
5868 if (ztest_object_init(zd, od, sizeof (ztest_od_t), B_FALSE) != 0) { in ztest_zap_parallel()
5869 umem_free(od, sizeof (ztest_od_t)); in ztest_zap_parallel()
5873 object = od->od_object; in ztest_zap_parallel()
5913 umem_free(od, sizeof (ztest_od_t)); in ztest_zap_parallel()
5965 umem_free(od, sizeof (ztest_od_t)); in ztest_zap_parallel()
6051 ztest_od_t *od; in ztest_dmu_commit_callbacks() local
6057 od = umem_alloc(sizeof (ztest_od_t), UMEM_NOFAIL); in ztest_dmu_commit_callbacks()
6058 ztest_od_init(od, id, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, 0); in ztest_dmu_commit_callbacks()
6060 if (ztest_object_init(zd, od, sizeof (ztest_od_t), B_FALSE) != 0) { in ztest_dmu_commit_callbacks()
6061 umem_free(od, sizeof (ztest_od_t)); in ztest_dmu_commit_callbacks()
6070 dmu_tx_hold_write(tx, od->od_object, 0, sizeof (uint64_t)); in ztest_dmu_commit_callbacks()
6104 umem_free(od, sizeof (ztest_od_t)); in ztest_dmu_commit_callbacks()
6114 VERIFY0(dmu_read(os, od->od_object, 0, sizeof (uint64_t), in ztest_dmu_commit_callbacks()
6122 dmu_write(os, od->od_object, 0, sizeof (uint64_t), &txg, tx); in ztest_dmu_commit_callbacks()
6179 umem_free(od, sizeof (ztest_od_t)); in ztest_dmu_commit_callbacks()
7659 ztest_od_t *od; in ztest_rzx_thread() local
7666 od = umem_alloc(od_size, UMEM_NOFAIL); in ztest_rzx_thread()
7671 ztest_od_init(od + b, info->rzx_id, FTAG, b, in ztest_rzx_thread()
7674 if (ztest_object_init(zd, od, od_size, B_FALSE) != 0) { in ztest_rzx_thread()
7675 umem_free(od, od_size); in ztest_rzx_thread()
7685 ztest_write(zd, od[i].od_object, offset, in ztest_rzx_thread()
7700 (void) ztest_remove(zd, od, 2); in ztest_rzx_thread()
7703 umem_free(od, od_size); in ztest_rzx_thread()
7967 ztest_od_t od; in ztest_freeze() local
7968 ztest_od_init(&od, 0, FTAG, 0, DMU_OT_UINT64_OTHER, 0, 0, 0); in ztest_freeze()
7969 VERIFY0(ztest_object_init(zd, &od, sizeof (od), B_FALSE)); in ztest_freeze()
7970 ztest_io(zd, od.od_object, in ztest_freeze()