Lines Matching refs:ztest_random

788 ztest_random(uint64_t range)  in ztest_random()  function
814 return (SPA_MINBLOCKSHIFT + ztest_random(5)); in ztest_get_ashift()
963 ztest_random(SPA_VERSION_BEFORE_FEATURES - version + 1); in ztest_random_spa_version()
984 block_shift = ztest_random(maxbs - ztest_spa->spa_max_ashift + 1); in ztest_random_blocksize()
992 ztest_random(DN_MAX_INDBLKSHIFT - DN_MIN_INDBLKSHIFT + 1)); in ztest_random_ibshift()
1005 top = ztest_random(rvd->vdev_children); in ztest_random_vdev_top()
1019 value = zfs_prop_random_value(prop, ztest_random(-1ULL)); in ztest_random_dsl_prop()
1212 #define TXG_MIGHTWAIT (ztest_random(10) == 0 ? TXG_NOWAIT : TXG_WAIT)
1352 itx_wr_state_t write_state = ztest_random(WR_NUM_STATES); in ztest_log_write()
1372 itx->itx_sync = (ztest_random(8) == 0); in ztest_log_write()
1604 if (ztest_random(8) == 0 && length == doi.doi_data_block_size && in ztest_replay_write()
1625 if (ztest_random(4) != 0) { in ztest_replay_write()
1626 int prefetch = ztest_random(2) ? in ztest_replay_write()
1754 lr->lr_size = (ztest_random(db->db_size / sizeof (*bbt)) + 1) * in ztest_replay_setattr()
2176 io_type = ztest_random(ZTEST_IO_TYPES); in ztest_io()
2177 if (ztest_random(2) == 0) in ztest_io()
2191 if (ztest_random(2) == 0) { in ztest_io()
2294 zil_commit(zilog, ztest_random(ZTEST_OBJECTS)); in ztest_zil_commit()
2515 if (spa_has_slogs(spa) && ztest_random(4) == 0) { in ztest_vdev_add_remove()
2545 ztest_random(4) == 0, ztest_opts.zo_raidz, in ztest_vdev_add_remove()
2575 if (ztest_random(2) == 0) { in ztest_vdev_aux_add_remove()
2587 if (sav->sav_count != 0 && ztest_random(4) == 0) { in ztest_vdev_aux_add_remove()
2591 guid = sav->sav_vdevs[ztest_random(sav->sav_count)]->vdev_guid; in ztest_vdev_aux_add_remove()
2632 if (ztest_random(2) == 0) in ztest_vdev_aux_add_remove()
2772 replacing = ztest_random(2); in ztest_vdev_attach_detach()
2782 leaf = ztest_random(leaves); in ztest_vdev_attach_detach()
2806 oldvd = oldvd->vdev_child[ztest_random(oldvd->vdev_children)]; in ztest_vdev_attach_detach()
2819 if (oldvd_has_siblings && ztest_random(2) == 0) { in ztest_vdev_attach_detach()
2833 if (sav->sav_count != 0 && ztest_random(3) == 0) { in ztest_vdev_attach_detach()
2834 newvd = sav->sav_vdevs[ztest_random(sav->sav_count)]; in ztest_vdev_attach_detach()
2841 if (ztest_random(2) == 0) in ztest_vdev_attach_detach()
2855 newsize = 10 * oldsize / (9 + ztest_random(3)); in ztest_vdev_attach_detach()
3182 uint64_t zilset = ztest_random(100); in ztest_dataset_create()
3283 if (ztest_random(2) == 0 && in ztest_dmu_objset_create_destroy()
3331 iters = ztest_random(5); in ztest_dmu_objset_create_destroy()
3334 if (ztest_random(iters) == 0) in ztest_dmu_objset_create_destroy()
3530 while (ztest_random(4 * batchsize) != 0) in ztest_dmu_object_alloc_free()
3531 ztest_io(zd, od[ztest_random(batchsize)].od_object, in ztest_dmu_object_alloc_free()
3532 ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_object_alloc_free()
3548 uint64_t chunksize = (1000 + ztest_random(1000)) * sizeof (uint64_t); in ztest_dmu_read_write()
3598 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write()
3599 s = 1 + ztest_random(2 * width - 1); in ztest_dmu_read_write()
3606 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write()
3607 s = 1 + ztest_random(width - 1); in ztest_dmu_read_write()
3622 freeit = (ztest_random(100) < free_percent); in ztest_dmu_read_write()
3706 pack->bw_data = 1 + ztest_random(-2ULL); in ztest_dmu_read_write()
3805 pack->bw_data = 1 + ztest_random(-2ULL); in compare_and_update_pbbufs()
3871 n = ztest_random(regions) * stride + ztest_random(width); in ztest_dmu_read_write_zcopy()
3872 s = 1 + ztest_random(width - 1); in ztest_dmu_read_write_zcopy()
3951 if (i != 0 || ztest_random(2) != 0) { in ztest_dmu_read_write_zcopy()
4045 uint64_t offset = (1ULL << (ztest_random(20) + 43)) + in ztest_dmu_write_parallel()
4046 (ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_write_parallel()
4058 while (ztest_random(10) != 0) in ztest_dmu_write_parallel()
4066 uint64_t offset = (1ULL << (ztest_random(4) + SPA_MAXBLOCKSHIFT)) + in ztest_dmu_prealloc()
4067 (ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_dmu_prealloc()
4068 uint64_t count = ztest_random(20) + 1; in ztest_dmu_prealloc()
4074 if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) in ztest_dmu_prealloc()
4084 while (ztest_random(count) != 0) { in ztest_dmu_prealloc()
4085 uint64_t randoff = offset + (ztest_random(count) * blocksize); in ztest_dmu_prealloc()
4089 while (ztest_random(4) != 0) in ztest_dmu_prealloc()
4120 if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) in ztest_zap()
4157 prop = ztest_random(ZTEST_ZAP_MAX_PROPS); in ztest_zap()
4219 prop = ztest_random(ZTEST_ZAP_MAX_PROPS); in ztest_zap()
4252 if (ztest_object_init(zd, od, sizeof (od), !ztest_random(2)) != 0) in ztest_fzap()
4292 int micro = ztest_random(2); in ztest_zap_parallel()
4309 namelen = ztest_random(sizeof (name) - 5) + 5 + 1; in ztest_zap_parallel()
4312 name[i] = '!' + ztest_random('~' - '!' + 1); in ztest_zap_parallel()
4334 i = ztest_random(5); in ztest_zap_parallel()
4497 if (ztest_random(100) == 0) in ztest_dmu_commit_callbacks()
4613 ztest_random_dsl_prop(proplist[p]), (int)ztest_random(2)); in ztest_dsl_prop_get_set()
4627 ZIO_DEDUPDITTO_MIN + ztest_random(ZIO_DEDUPDITTO_MIN)); in ztest_spa_prop_get_set()
4825 if (ztest_random(2) == 0) { in ztest_fault_inject()
4830 leaf = ztest_random(leaves) + zs->zs_splits; in ztest_fault_inject()
4869 if (vf != NULL && ztest_random(3) == 0) { in ztest_fault_inject()
4872 } else if (ztest_random(2) == 0) { in ztest_fault_inject()
4890 vd0 = sav->sav_vdevs[ztest_random(sav->sav_count)]; in ztest_fault_inject()
4908 if (ztest_random(10) < 6) { in ztest_fault_inject()
4909 int flags = (ztest_random(2) == 0 ? in ztest_fault_inject()
4957 offset = ztest_random(fsize / (leaves << bshift)) * in ztest_fault_inject()
4959 (ztest_random(1ULL << (bshift - 1)) & -8ULL); in ztest_fault_inject()
5279 if (ztest_random(2) == 0) in ztest_spa_import_export()
5445 rand = ztest_random(ZTEST_FUNCS); in ztest_thread()
5452 ztest_random(2 * zi->zi_interval[0] + 1)) == call_next) { in ztest_thread()
5604 if (ztest_random(100) < ztest_opts.zo_killrate) { in ztest_run()
5606 ztest_random(ztest_opts.zo_passtime * NANOSEC); in ztest_run()
5620 metaslab_preload_limit = ztest_random(20) + 1; in ztest_run()
5671 int d = ztest_random(ztest_opts.zo_datasets); in ztest_run()
5740 if (ztest_random(2) == 0) { in ztest_run()
5809 while (ztest_random(10) != 0 && in ztest_freeze()
5816 ztest_random(ZTEST_RANGE_LOCKS) << SPA_MAXBLOCKSHIFT); in ztest_freeze()
5882 if (ztest_random(2) == 0) in make_random_props()
6212 ztest_random(2 * zi->zi_interval[0] + 1); in main()
6235 ztest_random(zs->zs_metaslab_sz / 4) + 1; in main()
6237 if (!hasalt || ztest_random(2) == 0) { in main()