Lines Matching refs:ztest_random
901 ztest_random(uint64_t range) in ztest_random() function
1122 switch (ztest_random(3)) { in process_options()
1268 return (SPA_MINBLOCKSHIFT + ztest_random(5)); in ztest_get_ashift()
1466 ztest_random(SPA_VERSION_BEFORE_FEATURES - version + 1); in ztest_random_spa_version()
1489 ztest_random(maxbs - ztest_spa->spa_max_ashift + 1); in ztest_random_blocksize()
1508 switch (ztest_random(10)) { in ztest_random_dnodesize()
1510 slots = 5 + ztest_random(max_slots - 4); in ztest_random_dnodesize()
1513 slots = 2 + ztest_random(3); in ztest_random_dnodesize()
1527 ztest_random(DN_MAX_INDBLKSHIFT - DN_MIN_INDBLKSHIFT + 1)); in ztest_random_ibshift()
1540 top = ztest_random(rvd->vdev_children); in ztest_random_vdev_top()
1554 value = zfs_prop_random_value(prop, ztest_random(-1ULL)); in ztest_random_dsl_prop()
1815 (ztest_random(10) == 0 ? DMU_TX_NOWAIT : DMU_TX_WAIT)
1983 itx_wr_state_t write_state = ztest_random(WR_NUM_STATES); in ztest_log_write()
2004 itx->itx_sync = (ztest_random(8) == 0); in ztest_log_write()
2246 if (ztest_random(8) == 0 && length == doi.doi_data_block_size && in ztest_replay_write()
2268 if (ztest_random(4) != 0) { in ztest_replay_write()
2269 dmu_flags_t flags = ztest_random(2) ? in ztest_replay_write()
2275 if (ztest_random(4) == 0) in ztest_replay_write()
2410 lr->lr_size = (ztest_random(db->db_size / sizeof (*bbt)) + 1) * in ztest_replay_setattr()
2834 if (ztest_random(4) == 0) in ztest_io()
2844 io_type = ztest_random(ZTEST_IO_TYPES); in ztest_io()
2845 if (ztest_random(2) == 0) in ztest_io()
2860 if (ztest_random(2) == 0) { in ztest_io()
2968 VERIFY0(zil_commit(zilog, ztest_random(ZTEST_OBJECTS))); in ztest_zil_commit()
3284 if (ztest_random(2) == 0) { in ztest_spa_checkpoint_create_discard()
3348 if (spa_has_slogs(spa) && ztest_random(4) == 0) { in ztest_vdev_add_remove()
3392 ztest_opts.zo_vdev_size, 0, (ztest_random(4) == 0) ? in ztest_vdev_add_remove()
3422 const char *class = (ztest_random(2) == 0) ? in ztest_vdev_class_add()
3431 ztest_random(2) == 0)) { in ztest_vdev_class_add()
3471 spa_special_class(spa)->mc_groups == 1 && ztest_random(2) == 0) { in ztest_vdev_class_add()
3514 if (ztest_random(2) == 0) { in ztest_vdev_aux_add_remove()
3526 if (sav->sav_count != 0 && ztest_random(4) == 0) { in ztest_vdev_aux_add_remove()
3530 vdev_t *svd = sav->sav_vdevs[ztest_random(sav->sav_count)]; in ztest_vdev_aux_add_remove()
3581 if (ztest_random(2) == 0) in ztest_vdev_aux_add_remove()
3764 replacing = ztest_random(2); in ztest_vdev_attach_detach()
3774 leaf = ztest_random(leaves); in ztest_vdev_attach_detach()
3804 oldvd = oldvd->vdev_child[ztest_random(oldvd->vdev_children)]; in ztest_vdev_attach_detach()
3822 if (oldvd_has_siblings && ztest_random(2) == 0) { in ztest_vdev_attach_detach()
3842 if (sav->sav_count != 0 && ztest_random(3) == 0) { in ztest_vdev_attach_detach()
3843 newvd = sav->sav_vdevs[ztest_random(sav->sav_count)]; in ztest_vdev_attach_detach()
3854 if (ztest_random(2) == 0) in ztest_vdev_attach_detach()
3872 newsize = 10 * oldsize / (9 + ztest_random(3)); in ztest_vdev_attach_detach()
3921 rebuilding = !!ztest_random(2); in ztest_vdev_attach_detach()
4112 newvd = pvd->vdev_child[ztest_random(pvd->vdev_children)]; in ztest_vdev_raidz_attach()
4113 newsize = 10 * vdev_get_min_asize(newvd) / (9 + ztest_random(2)); in ztest_vdev_raidz_attach()
4145 if (ztest_random(2) == 0 && expected_error == 0) { in ztest_vdev_raidz_attach()
4147 ztest_random(RAIDZ_EXPAND_PAUSE_SCRATCH_POST_REFLOW_2) + 1; in ztest_vdev_raidz_attach()
4551 rand = ztest_random(2); in ztest_dataset_create()
4557 rand = ztest_random(ZIO_CRYPT_FUNCTIONS); in ztest_dataset_create()
4598 rand = ztest_random(100); in ztest_dataset_create()
4716 if (ztest_random(2) == 0 && in ztest_dmu_objset_create_destroy()
4772 iters = ztest_random(5); in ztest_dmu_objset_create_destroy()
4775 if (ztest_random(iters) == 0) in ztest_dmu_objset_create_destroy()
5014 while (ztest_random(4 * batchsize) != 0) in ztest_dmu_object_alloc_free()
5015 ztest_io(zd, od[ztest_random(batchsize)].od_object, in ztest_dmu_object_alloc_free()
5016 ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_object_alloc_free()
5037 object = ztest_random(os->os_obj_next_chunk); in ztest_dmu_object_next_chunk()
5063 uint64_t chunksize = (1000 + ztest_random(1000)) * sizeof (uint64_t); in ztest_dmu_read_write()
5073 if (ztest_random(4) == 0) in ztest_dmu_read_write()
5123 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write()
5124 s = 1 + ztest_random(2 * width - 1); in ztest_dmu_read_write()
5131 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write()
5132 s = 1 + ztest_random(width - 1); in ztest_dmu_read_write()
5147 freeit = (ztest_random(100) < free_percent); in ztest_dmu_read_write()
5236 pack->bw_data = 1 + ztest_random(-2ULL); in ztest_dmu_read_write()
5336 pack->bw_data = 1 + ztest_random(-2ULL); in compare_and_update_pbbufs()
5371 if (ztest_random(4) == 0) in ztest_dmu_read_write_zcopy()
5420 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write_zcopy()
5421 s = 1 + ztest_random(width - 1); in ztest_dmu_read_write_zcopy()
5501 if (i != 0 || ztest_random(2) != 0) { in ztest_dmu_read_write_zcopy()
5597 uint64_t offset = (1ULL << (ztest_random(20) + 43)) + in ztest_dmu_write_parallel()
5598 (ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_write_parallel()
5610 while (ztest_random(10) != 0) in ztest_dmu_write_parallel()
5620 uint64_t offset = (1ULL << (ztest_random(4) + SPA_MAXBLOCKSHIFT)) + in ztest_dmu_prealloc()
5621 (ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_prealloc()
5622 uint64_t count = ztest_random(20) + 1; in ztest_dmu_prealloc()
5631 !ztest_random(2)) != 0) { in ztest_dmu_prealloc()
5645 while (ztest_random(count) != 0) { in ztest_dmu_prealloc()
5646 uint64_t randoff = offset + (ztest_random(count) * blocksize); in ztest_dmu_prealloc()
5650 while (ztest_random(4) != 0) in ztest_dmu_prealloc()
5684 !ztest_random(2)) != 0) in ztest_zap()
5721 prop = ztest_random(ZTEST_ZAP_MAX_PROPS); in ztest_zap()
5784 prop = ztest_random(ZTEST_ZAP_MAX_PROPS); in ztest_zap()
5821 !ztest_random(2)) != 0) in ztest_fzap()
5861 int micro = ztest_random(2); in ztest_zap_parallel()
5881 namelen = ztest_random(sizeof (name) - 5) + 5 + 1; in ztest_zap_parallel()
5884 name[i] = '!' + ztest_random('~' - '!' + 1); in ztest_zap_parallel()
5906 i = ztest_random(5); in ztest_zap_parallel()
6073 if (ztest_random(100) == 0) in ztest_dmu_commit_callbacks()
6237 ztest_random_dsl_prop(proplist[p]), (int)ztest_random(2)); in ztest_dsl_prop_get_set()
6242 ztest_random_blocksize(), (int)ztest_random(2)); in ztest_dsl_prop_get_set()
6255 (void) ztest_spa_prop_set_uint64(ZPOOL_PROP_AUTOTRIM, ztest_random(2)); in ztest_spa_prop_get_set()
6494 if (ztest_random(2) == 0) { in ztest_fault_inject()
6499 leaf = ztest_random(leaves) + zs->zs_splits; in ztest_fault_inject()
6541 if (vf != NULL && ztest_random(3) == 0) { in ztest_fault_inject()
6544 } else if (ztest_random(2) == 0) { in ztest_fault_inject()
6562 vd0 = sav->sav_vdevs[ztest_random(sav->sav_count)]; in ztest_fault_inject()
6580 if (ztest_random(10) < 6) { in ztest_fault_inject()
6581 int flags = (ztest_random(2) == 0 ? in ztest_fault_inject()
6652 offset = ztest_random(fsize / (leaves << bshift)) * in ztest_fault_inject()
6654 (ztest_random(1ULL << (bshift - 1)) & -8ULL); in ztest_fault_inject()
6835 *ptr = ztest_random(UINT_MAX); in ztest_blake3()
6925 *ptr = ztest_random(UINT_MAX); in ztest_fletcher()
6992 *ptr = ztest_random(UINT_MAX); in ztest_fletcher_incr()
7009 size_t inc = 64 * ztest_random(size / 67); in ztest_fletcher_incr()
7011 if (ztest_random(100) < 10) in ztest_fletcher_incr()
7012 inc += P2ALIGN_TYPED(ztest_random(64), in ztest_fletcher_incr()
7189 uint64_t child_no = ztest_random(eligible_idx); in ztest_random_concrete_vdev_leaf()
7224 uint64_t cmd = ztest_random(POOL_INITIALIZE_FUNCS); in ztest_initialize()
7296 uint64_t cmd = ztest_random(POOL_TRIM_FUNCS); in ztest_trim()
7297 uint64_t rate = 1 << ztest_random(30); in ztest_trim()
7298 boolean_t partial = (ztest_random(5) > 0); in ztest_trim()
7299 boolean_t secure = (ztest_random(5) > 0); in ztest_trim()
7347 uint64_t pct = ztest_random(15) + 1; in ztest_ddt_prune()
7458 if (ztest_random(2) == 0) in ztest_spa_import_export()
7548 if (ztest_random(10) == 0) in ztest_resume_thread()
7549 zfs_compressed_arc_enabled = ztest_random(2); in ztest_resume_thread()
7554 if (ztest_random(10) == 0) in ztest_resume_thread()
7555 zfs_abd_scatter_enabled = ztest_random(2); in ztest_resume_thread()
7737 rand = ztest_random(ZTEST_FUNCS); in ztest_thread()
7744 ztest_random(2 * zi->zi_interval[0] + 1)) == call_next) { in ztest_thread()
7967 while (ztest_random(10) != 0 && in ztest_freeze()
7974 ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_freeze()
8208 uint_t multiple = ztest_random(3) + 1; in ztest_raidz_expand_run()
8388 if (ztest_random(100) < ztest_opts.zo_killrate) { in ztest_run()
8390 ztest_random(ztest_opts.zo_passtime * NANOSEC); in ztest_run()
8413 metaslab_preload_limit = ztest_random(20) + 1; in ztest_run()
8471 int d = ztest_random(ztest_opts.zo_datasets); in ztest_run()
8554 if ((ztest_random(2) == 0) && !ztest_opts.zo_mmp_test) { in ztest_run()
8604 if (ztest_random(5) == 0) { in make_random_pool_props()
8611 if (ztest_random(2) == 0) { in make_random_pool_props()
8668 if (i == SPA_FEATURE_LOG_SPACEMAP && ztest_random(4) == 0) in ztest_init()
8674 if (i == SPA_FEATURE_FAST_DEDUP && ztest_random(2) != 0) in ztest_init()
9044 ztest_random(2 * zi->zi_interval[0] + 1); in main()
9067 ztest_random(zs->zs_metaslab_sz / 4) + 1; in main()
9069 if (!hasalt || ztest_random(2) == 0) { in main()