Lines Matching full:zs

301 #define	MAXFAULTS(zs) \  argument
302 (MAX((zs)->zs_mirrors, 1) * (ztest_opts.zo_raid_parity + 1) - 1)
1221 ztest_kill(ztest_shared_t *zs) in ztest_kill() argument
1223 zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(ztest_spa)); in ztest_kill()
1224 zs->zs_space = metaslab_class_get_space(spa_normal_class(ztest_spa)); in ztest_kill()
3325 ztest_shared_t *zs = ztest_shared; in ztest_vdev_add_remove() local
3339 leaves = MAX(zs->zs_mirrors + zs->zs_splits, 1) * raidz_children; in ztest_vdev_add_remove()
3393 "log" : NULL, raidz_children, zs->zs_mirrors, in ztest_vdev_add_remove()
3417 ztest_shared_t *zs = ztest_shared; in ztest_vdev_class_add() local
3438 if (zs->zs_mirrors < 2) { in ztest_vdev_class_add()
3450 leaves = MAX(zs->zs_mirrors + zs->zs_splits, 1) * raidz_children; in ztest_vdev_class_add()
3457 class, raidz_children, zs->zs_mirrors, 1); in ztest_vdev_class_add()
3500 ztest_shared_t *zs = ztest_shared; in ztest_vdev_aux_add_remove() local
3541 zs->zs_vdev_aux = 0; in ztest_vdev_aux_add_remove()
3546 zs->zs_vdev_aux); in ztest_vdev_aux_add_remove()
3554 zs->zs_vdev_aux++; in ztest_vdev_aux_add_remove()
3612 ztest_shared_t *zs = ztest_shared; in ztest_split_pool() local
3625 if (zs->zs_mirrors < 3 || ztest_opts.zo_raid_children > 1) { in ztest_split_pool()
3695 ++zs->zs_splits; in ztest_split_pool()
3696 --zs->zs_mirrors; in ztest_split_pool()
3708 ztest_shared_t *zs = ztest_shared; in ztest_vdev_attach_detach() local
3737 leaves = MAX(zs->zs_mirrors, 1) * raidz_children; in ztest_vdev_attach_detach()
3782 if (zs->zs_mirrors >= 1) { in ztest_vdev_attach_detach()
3784 ASSERT3U(oldvd->vdev_children, >=, zs->zs_mirrors); in ztest_vdev_attach_detach()
4075 ztest_shared_t *zs = ztest_shared; in ztest_vdev_raidz_attach() local
4119 leaves = MAX(zs->zs_mirrors + zs->zs_splits, 1) * raidz_children; in ztest_vdev_raidz_attach()
4120 zs->zs_vdev_next_leaf = spa_num_top_vdevs(spa) * leaves; in ztest_vdev_raidz_attach()
4131 ztest_opts.zo_dir, ztest_opts.zo_pool, zs->zs_vdev_next_leaf); in ztest_vdev_raidz_attach()
6417 ztest_shared_t *zs = ztest_shared; in ztest_fault_inject() local
6461 maxfaults = MAXFAULTS(zs); in ztest_fault_inject()
6463 leaves = MAX(zs->zs_mirrors, 1) * raidz_children; in ztest_fault_inject()
6464 mirror_save = zs->zs_mirrors; in ztest_fault_inject()
6499 leaf = ztest_random(leaves) + zs->zs_splits; in ztest_fault_inject()
6509 top * leaves + zs->zs_splits); in ztest_fault_inject()
6682 if (mirror_save != zs->zs_mirrors) { in ztest_fault_inject()
6790 ztest_shared_t *zs = ztest_shared; in ztest_reguid() local
6800 zs->zs_guid = spa_guid(spa); in ztest_reguid()
7564 ztest_shared_t *zs = arg; in ztest_deadman_thread() local
7568 delay = (zs->zs_thread_stop - zs->zs_thread_start) + in ztest_deadman_thread()
7600 overdue = zs->zs_proc_stop + MSEC2NSEC(zfs_deadman_synctime_ms); in ztest_deadman_thread()
7605 (gethrtime() - zs->zs_proc_start) / NANOSEC); in ztest_deadman_thread()
7609 (gethrtime() - zs->zs_proc_start) / NANOSEC); in ztest_deadman_thread()
7713 ztest_shared_t *zs = ztest_shared; in ztest_thread() local
7719 while ((now = gethrtime()) < zs->zs_thread_stop) { in ztest_thread()
7723 if (now > zs->zs_thread_kill && in ztest_thread()
7725 ztest_kill(zs); in ztest_thread()
7731 if (zs->zs_enospc_count > 10) in ztest_thread()
8036 ztest_import(ztest_shared_t *zs) in ztest_import() argument
8050 zs->zs_metaslab_sz = in ztest_import()
8052 zs->zs_guid = spa_guid(spa); in ztest_import()
8058 ztest_run_zdb(zs->zs_guid); in ztest_import()
8060 ztest_run_zdb(zs->zs_guid); in ztest_import()
8121 ztest_raidz_expand_run(ztest_shared_t *zs, spa_t *spa) in ztest_raidz_expand_run() argument
8200 zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(spa)); in ztest_raidz_expand_run()
8201 zs->zs_space = metaslab_class_get_space(spa_normal_class(spa)); in ztest_raidz_expand_run()
8306 ztest_kill(zs); in ztest_raidz_expand_run()
8310 ztest_generic_run(ztest_shared_t *zs, spa_t *spa) in ztest_generic_run() argument
8354 zs->zs_alloc = metaslab_class_get_alloc(spa_normal_class(spa)); in ztest_generic_run()
8355 zs->zs_space = metaslab_class_get_space(spa_normal_class(spa)); in ztest_generic_run()
8365 ztest_run(ztest_shared_t *zs) in ztest_run() argument
8383 zs->zs_thread_start = gethrtime(); in ztest_run()
8384 zs->zs_thread_stop = in ztest_run()
8385 zs->zs_thread_start + ztest_opts.zo_passtime * NANOSEC; in ztest_run()
8386 zs->zs_thread_stop = MIN(zs->zs_thread_stop, zs->zs_proc_stop); in ztest_run()
8387 zs->zs_thread_kill = zs->zs_thread_stop; in ztest_run()
8389 zs->zs_thread_kill -= in ztest_run()
8409 zs->zs_metaslab_sz = in ztest_run()
8444 zs, 0, NULL, TS_RUN | TS_JOINABLE, defclsyspri); in ztest_run()
8466 if (zs->zs_enospc_count != 0) { in ztest_run()
8475 zs->zs_enospc_count = 0; in ztest_run()
8514 ztest_raidz_expand_run(zs, spa); in ztest_run()
8518 ztest_generic_run(zs, spa); in ztest_run()
8624 ztest_init(ztest_shared_t *zs) in ztest_init() argument
8642 zs->zs_splits = 0; in ztest_init()
8643 zs->zs_mirrors = ztest_opts.zo_mirrors; in ztest_init()
8645 NULL, ztest_opts.zo_raid_children, zs->zs_mirrors, 1); in ztest_init()
8655 MAXFAULTS(zs) ? ZIO_FAILURE_MODE_PANIC : ZIO_FAILURE_MODE_WAIT); in ztest_init()
8688 zs->zs_metaslab_sz = in ztest_init()
8690 zs->zs_guid = spa_guid(spa); in ztest_init()
8696 ztest_run_zdb(zs->zs_guid); in ztest_init()
8698 ztest_run_zdb(zs->zs_guid); in ztest_init()
8866 ztest_shared_t *zs = ztest_shared; in ztest_run_init() local
8877 ztest_import(zs); in ztest_run_init()
8885 memset(zs, 0, sizeof (*zs)); in ztest_run_init()
8890 ztest_init(zs); in ztest_run_init()
8901 ztest_shared_t *zs; in main() local
8990 zs = ztest_shared; in main()
8995 zs->zs_metaslab_df_alloc_threshold; in main()
8997 if (zs->zs_do_init) in main()
9000 ztest_run(zs); in main()
9021 zs->zs_do_init = B_TRUE; in main()
9032 zs->zs_do_init = B_FALSE; in main()
9034 zs->zs_proc_start = gethrtime(); in main()
9035 zs->zs_proc_stop = zs->zs_proc_start + ztest_opts.zo_time * NANOSEC; in main()
9040 if (zs->zs_proc_start + zi->zi_interval[0] > zs->zs_proc_stop) in main()
9043 zc->zc_next = zs->zs_proc_start + in main()
9052 while (gethrtime() < zs->zs_proc_stop) { in main()
9066 zs->zs_metaslab_df_alloc_threshold = in main()
9067 ztest_random(zs->zs_metaslab_sz / 4) + 1; in main()
9093 now = MIN(now, zs->zs_proc_stop); in main()
9094 print_time(zs->zs_proc_stop - now, timebuf); in main()
9095 nicenum(zs->zs_space, numbuf, sizeof (numbuf)); in main()
9101 zs->zs_enospc_count, in main()
9102 100.0 * zs->zs_alloc / zs->zs_space, in main()
9104 100.0 * (now - zs->zs_proc_start) / in main()
9126 ztest_run_zdb(zs->zs_guid); in main()