Lines Matching refs:zs
202 (MAX(zs->zs_mirrors, 1) * (ztest_opts.zo_raidz_parity + 1) - 1)
767 ztest_kill(ztest_shared_t *zs) in ztest_kill() argument
769 zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(ztest_spa)); in ztest_kill()
770 zs->zs_space = metaslab_class_get_space(spa_normal_class(ztest_spa)); in ztest_kill()
2495 ztest_shared_t *zs = ztest_shared; in ztest_vdev_add_remove() local
2503 leaves = MAX(zs->zs_mirrors + zs->zs_splits, 1) * ztest_opts.zo_raidz; in ztest_vdev_add_remove()
2543 zs->zs_mirrors, 1); in ztest_vdev_add_remove()
2564 ztest_shared_t *zs = ztest_shared; in ztest_vdev_aux_add_remove() local
2593 zs->zs_vdev_aux = 0; in ztest_vdev_aux_add_remove()
2599 zs->zs_vdev_aux); in ztest_vdev_aux_add_remove()
2607 zs->zs_vdev_aux++; in ztest_vdev_aux_add_remove()
2647 ztest_shared_t *zs = ztest_shared; in ztest_split_pool() local
2657 if (zs->zs_mirrors < 3 || ztest_opts.zo_raidz > 1) { in ztest_split_pool()
2729 ++zs->zs_splits; in ztest_split_pool()
2730 --zs->zs_mirrors; in ztest_split_pool()
2743 ztest_shared_t *zs = ztest_shared; in ztest_vdev_attach_detach() local
2762 leaves = MAX(zs->zs_mirrors, 1) * ztest_opts.zo_raidz; in ztest_vdev_attach_detach()
2785 if (zs->zs_mirrors >= 1) { in ztest_vdev_attach_detach()
2787 ASSERT(oldvd->vdev_children >= zs->zs_mirrors); in ztest_vdev_attach_detach()
4783 ztest_shared_t *zs = ztest_shared; in ztest_fault_inject() local
4803 leaves = MAX(zs->zs_mirrors, 1) * ztest_opts.zo_raidz; in ztest_fault_inject()
4804 mirror_save = zs->zs_mirrors; in ztest_fault_inject()
4827 leaf = ztest_random(leaves) + zs->zs_splits; in ztest_fault_inject()
4837 top * leaves + zs->zs_splits); in ztest_fault_inject()
4962 if (mirror_save != zs->zs_mirrors) { in ztest_fault_inject()
4988 ztest_shared_t *zs = ztest_shared; in ztest_ddt_repair() local
5024 pattern = zs->zs_guid ^ dmu_objset_fsid_guid(os); in ztest_ddt_repair()
5362 ztest_shared_t *zs = arg; in ztest_deadman_thread() local
5367 delta = zs->zs_thread_stop - zs->zs_thread_start + in ztest_deadman_thread()
5420 ztest_shared_t *zs = ztest_shared; in ztest_thread() local
5426 while ((now = gethrtime()) < zs->zs_thread_stop) { in ztest_thread()
5430 if (now > zs->zs_thread_kill) in ztest_thread()
5431 ztest_kill(zs); in ztest_thread()
5436 if (zs->zs_enospc_count > 10) in ztest_thread()
5580 ztest_run(ztest_shared_t *zs) in ztest_run() argument
5596 zs->zs_thread_start = gethrtime(); in ztest_run()
5597 zs->zs_thread_stop = in ztest_run()
5598 zs->zs_thread_start + ztest_opts.zo_passtime * NANOSEC; in ztest_run()
5599 zs->zs_thread_stop = MIN(zs->zs_thread_stop, zs->zs_proc_stop); in ztest_run()
5600 zs->zs_thread_kill = zs->zs_thread_stop; in ztest_run()
5602 zs->zs_thread_kill -= in ztest_run()
5622 zs->zs_guid = dmu_objset_fsid_guid(os); in ztest_run()
5646 VERIFY(thr_create(0, 0, ztest_deadman_thread, zs, THR_BOUND, in ztest_run()
5667 if (zs->zs_enospc_count != 0) { in ztest_run()
5671 zs->zs_enospc_count = 0; in ztest_run()
5702 zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(spa)); in ztest_run()
5703 zs->zs_space = metaslab_class_get_space(spa_normal_class(spa)); in ztest_run()
5891 ztest_init(ztest_shared_t *zs) in ztest_init() argument
5906 zs->zs_splits = 0; in ztest_init()
5907 zs->zs_mirrors = ztest_opts.zo_mirrors; in ztest_init()
5909 0, ztest_opts.zo_raidz, zs->zs_mirrors, 1); in ztest_init()
5921 zs->zs_metaslab_sz = in ztest_init()
6090 ztest_shared_t *zs = ztest_shared; in ztest_run_init() local
6103 bzero(zs, sizeof (ztest_shared_t)); in ztest_run_init()
6108 ztest_init(zs); in ztest_run_init()
6119 ztest_shared_t *zs; in main() local
6158 zs = ztest_shared; in main()
6163 zs->zs_metaslab_df_alloc_threshold; in main()
6165 if (zs->zs_do_init) in main()
6168 ztest_run(zs); in main()
6186 zs->zs_do_init = B_TRUE; in main()
6197 zs->zs_do_init = B_FALSE; in main()
6199 zs->zs_proc_start = gethrtime(); in main()
6200 zs->zs_proc_stop = zs->zs_proc_start + ztest_opts.zo_time * NANOSEC; in main()
6205 if (zs->zs_proc_start + zi->zi_interval[0] > zs->zs_proc_stop) in main()
6208 zc->zc_next = zs->zs_proc_start + in main()
6217 while (gethrtime() < zs->zs_proc_stop) { in main()
6231 zs->zs_metaslab_df_alloc_threshold = in main()
6232 ztest_random(zs->zs_metaslab_sz / 4) + 1; in main()
6258 now = MIN(now, zs->zs_proc_stop); in main()
6259 print_time(zs->zs_proc_stop - now, timebuf); in main()
6260 nicenum(zs->zs_space, numbuf); in main()
6266 (u_longlong_t)zs->zs_enospc_count, in main()
6267 100.0 * zs->zs_alloc / zs->zs_space, in main()
6269 100.0 * (now - zs->zs_proc_start) / in main()