Lines Matching refs:ztest_random

785 ztest_random(uint64_t range)  in ztest_random()  function
811 return (SPA_MINBLOCKSHIFT + ztest_random(5)); in ztest_get_ashift()
960 ztest_random(SPA_VERSION_BEFORE_FEATURES - version + 1); in ztest_random_spa_version()
981 block_shift = ztest_random(maxbs - ztest_spa->spa_max_ashift + 1); in ztest_random_blocksize()
989 ztest_random(DN_MAX_INDBLKSHIFT - DN_MIN_INDBLKSHIFT + 1)); in ztest_random_ibshift()
1002 top = ztest_random(rvd->vdev_children); in ztest_random_vdev_top()
1016 value = zfs_prop_random_value(prop, ztest_random(-1ULL)); in ztest_random_dsl_prop()
1209 #define TXG_MIGHTWAIT (ztest_random(10) == 0 ? TXG_NOWAIT : TXG_WAIT)
1349 itx_wr_state_t write_state = ztest_random(WR_NUM_STATES); in ztest_log_write()
1369 itx->itx_sync = (ztest_random(8) == 0); in ztest_log_write()
1601 if (ztest_random(8) == 0 && length == doi.doi_data_block_size && in ztest_replay_write()
1622 if (ztest_random(4) != 0) { in ztest_replay_write()
1623 int prefetch = ztest_random(2) ? in ztest_replay_write()
1751 lr->lr_size = (ztest_random(db->db_size / sizeof (*bbt)) + 1) * in ztest_replay_setattr()
2173 io_type = ztest_random(ZTEST_IO_TYPES); in ztest_io()
2174 if (ztest_random(2) == 0) in ztest_io()
2188 if (ztest_random(2) == 0) { in ztest_io()
2291 zil_commit(zilog, ztest_random(ZTEST_OBJECTS)); in ztest_zil_commit()
2512 if (spa_has_slogs(spa) && ztest_random(4) == 0) { in ztest_vdev_add_remove()
2542 ztest_random(4) == 0, ztest_opts.zo_raidz, in ztest_vdev_add_remove()
2572 if (ztest_random(2) == 0) { in ztest_vdev_aux_add_remove()
2584 if (sav->sav_count != 0 && ztest_random(4) == 0) { in ztest_vdev_aux_add_remove()
2588 guid = sav->sav_vdevs[ztest_random(sav->sav_count)]->vdev_guid; in ztest_vdev_aux_add_remove()
2629 if (ztest_random(2) == 0) in ztest_vdev_aux_add_remove()
2769 replacing = ztest_random(2); in ztest_vdev_attach_detach()
2779 leaf = ztest_random(leaves); in ztest_vdev_attach_detach()
2803 oldvd = oldvd->vdev_child[ztest_random(oldvd->vdev_children)]; in ztest_vdev_attach_detach()
2816 if (oldvd_has_siblings && ztest_random(2) == 0) { in ztest_vdev_attach_detach()
2830 if (sav->sav_count != 0 && ztest_random(3) == 0) { in ztest_vdev_attach_detach()
2831 newvd = sav->sav_vdevs[ztest_random(sav->sav_count)]; in ztest_vdev_attach_detach()
2838 if (ztest_random(2) == 0) in ztest_vdev_attach_detach()
2852 newsize = 10 * oldsize / (9 + ztest_random(3)); in ztest_vdev_attach_detach()
3179 uint64_t zilset = ztest_random(100); in ztest_dataset_create()
3280 if (ztest_random(2) == 0 && in ztest_dmu_objset_create_destroy()
3328 iters = ztest_random(5); in ztest_dmu_objset_create_destroy()
3331 if (ztest_random(iters) == 0) in ztest_dmu_objset_create_destroy()
3527 while (ztest_random(4 * batchsize) != 0) in ztest_dmu_object_alloc_free()
3528 ztest_io(zd, od[ztest_random(batchsize)].od_object, in ztest_dmu_object_alloc_free()
3529 ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_object_alloc_free()
3545 uint64_t chunksize = (1000 + ztest_random(1000)) * sizeof (uint64_t); in ztest_dmu_read_write()
3595 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write()
3596 s = 1 + ztest_random(2 * width - 1); in ztest_dmu_read_write()
3603 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write()
3604 s = 1 + ztest_random(width - 1); in ztest_dmu_read_write()
3619 freeit = (ztest_random(100) < free_percent); in ztest_dmu_read_write()
3703 pack->bw_data = 1 + ztest_random(-2ULL); in ztest_dmu_read_write()
3802 pack->bw_data = 1 + ztest_random(-2ULL); in compare_and_update_pbbufs()
3868 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write_zcopy()
3869 s = 1 + ztest_random(width - 1); in ztest_dmu_read_write_zcopy()
3948 if (i != 0 || ztest_random(2) != 0) { in ztest_dmu_read_write_zcopy()
4042 uint64_t offset = (1ULL << (ztest_random(20) + 43)) + in ztest_dmu_write_parallel()
4043 (ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_write_parallel()
4055 while (ztest_random(10) != 0) in ztest_dmu_write_parallel()
4063 uint64_t offset = (1ULL << (ztest_random(4) + SPA_MAXBLOCKSHIFT)) + in ztest_dmu_prealloc()
4064 (ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_prealloc()
4065 uint64_t count = ztest_random(20) + 1; in ztest_dmu_prealloc()
4071 if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) in ztest_dmu_prealloc()
4081 while (ztest_random(count) != 0) { in ztest_dmu_prealloc()
4082 uint64_t randoff = offset + (ztest_random(count) * blocksize); in ztest_dmu_prealloc()
4086 while (ztest_random(4) != 0) in ztest_dmu_prealloc()
4117 if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) in ztest_zap()
4154 prop = ztest_random(ZTEST_ZAP_MAX_PROPS); in ztest_zap()
4216 prop = ztest_random(ZTEST_ZAP_MAX_PROPS); in ztest_zap()
4249 if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) in ztest_fzap()
4289 int micro = ztest_random(2); in ztest_zap_parallel()
4306 namelen = ztest_random(sizeof (name) - 5) + 5 + 1; in ztest_zap_parallel()
4309 name[i] = '!' + ztest_random('~' - '!' + 1); in ztest_zap_parallel()
4331 i = ztest_random(5); in ztest_zap_parallel()
4494 if (ztest_random(100) == 0) in ztest_dmu_commit_callbacks()
4610 ztest_random_dsl_prop(proplist[p]), (int)ztest_random(2)); in ztest_dsl_prop_get_set()
4624 ZIO_DEDUPDITTO_MIN + ztest_random(ZIO_DEDUPDITTO_MIN)); in ztest_spa_prop_get_set()
4822 if (ztest_random(2) == 0) { in ztest_fault_inject()
4827 leaf = ztest_random(leaves) + zs->zs_splits; in ztest_fault_inject()
4866 if (vf != NULL && ztest_random(3) == 0) { in ztest_fault_inject()
4869 } else if (ztest_random(2) == 0) { in ztest_fault_inject()
4887 vd0 = sav->sav_vdevs[ztest_random(sav->sav_count)]; in ztest_fault_inject()
4905 if (ztest_random(10) < 6) { in ztest_fault_inject()
4906 int flags = (ztest_random(2) == 0 ? in ztest_fault_inject()
4954 offset = ztest_random(fsize / (leaves << bshift)) * in ztest_fault_inject()
4956 (ztest_random(1ULL << (bshift - 1)) & -8ULL); in ztest_fault_inject()
5276 if (ztest_random(2) == 0) in ztest_spa_import_export()
5442 rand = ztest_random(ZTEST_FUNCS); in ztest_thread()
5449 ztest_random(2 * zi->zi_interval[0] + 1)) == call_next) { in ztest_thread()
5601 if (ztest_random(100) < ztest_opts.zo_killrate) { in ztest_run()
5603 ztest_random(ztest_opts.zo_passtime * NANOSEC); in ztest_run()
5617 metaslab_preload_limit = ztest_random(20) + 1; in ztest_run()
5668 int d = ztest_random(ztest_opts.zo_datasets); in ztest_run()
5737 if (ztest_random(2) == 0) { in ztest_run()
5806 while (ztest_random(10) != 0 && in ztest_freeze()
5813 ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_freeze()
5879 if (ztest_random(2) == 0) in make_random_props()
6209 ztest_random(2 * zi->zi_interval[0] + 1); in main()
6232 ztest_random(zs->zs_metaslab_sz / 4) + 1; in main()
6234 if (!hasalt || ztest_random(2) == 0) { in main()