/freebsd/sys/contrib/openzfs/cmd/zpool_influxdb/ |
H A D | zpool_influxdb.c | 147 print_scan_status(nvlist_t *nvroot, const char *pool_name) in print_scan_status() argument 159 (void) nvlist_lookup_uint64_array(nvroot, in print_scan_status() 262 get_vdev_name(nvlist_t *nvroot, const char *parent_name) in get_vdev_name() argument 268 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_TYPE, &vdev_type); in get_vdev_name() 271 nvroot, ZPOOL_CONFIG_ID, &vdev_id) != 0) in get_vdev_name() 296 get_vdev_desc(nvlist_t *nvroot, const char *parent_name) in get_vdev_desc() argument 305 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_TYPE, &vdev_type); in get_vdev_desc() 306 (void) nvlist_lookup_uint64(nvroot, ZPOOL_CONFIG_ID, &vdev_id); in get_vdev_desc() 307 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_PATH, &vdev_path); in get_vdev_desc() 338 print_summary_stats(nvlist_t *nvroot, const char *pool_name, in print_summary_stats() argument [all …]
|
/freebsd/sys/contrib/openzfs/lib/libzfs/ |
H A D | libzfs_status.c | 232 nvlist_t *nvroot = fnvlist_lookup_nvlist(config, in check_status() local 234 vdev_stat_t *vs = (vdev_stat_t *)fnvlist_lookup_uint64_array(nvroot, in check_status() 242 (void) nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_SCAN_STATS, in check_status() 255 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in check_status() 373 find_vdev_problem(nvroot, vdev_faulted, B_TRUE)) in check_status() 377 find_vdev_problem(nvroot, vdev_missing, B_TRUE)) in check_status() 381 find_vdev_problem(nvroot, vdev_broken, B_TRUE)) in check_status() 404 if (find_vdev_problem(nvroot, vdev_faulted, B_TRUE)) in check_status() 406 if (find_vdev_problem(nvroot, vdev_missing, B_TRUE)) in check_status() 408 if (find_vdev_problem(nvroot, vdev_broken, B_TRUE)) in check_status() [all …]
|
H A D | libzfs_import.c | 254 nvlist_t *nvroot = fnvlist_lookup_nvlist(zhp->zpool_config, in find_aux() local 257 if (nvlist_lookup_nvlist_array(nvroot, cbp->cb_type, in find_aux() 354 nvlist_t *nvroot = fnvlist_lookup_nvlist( in zpool_in_use() local 356 ret = find_guid(nvroot, vdev_guid); in zpool_in_use()
|
H A D | libzfs_pool.c | 269 nvlist_t *nvroot = fnvlist_lookup_nvlist( in zpool_get_state_str() local 273 nvroot, ZPOOL_CONFIG_VDEV_STATS, &vsc); in zpool_get_state_str() 1426 zpool_has_special_vdev(nvlist_t *nvroot) in zpool_has_special_vdev() argument 1431 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, &child, in zpool_has_special_vdev() 1450 zpool_has_draid_vdev(nvlist_t *nvroot) in zpool_has_draid_vdev() argument 1455 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zpool_has_draid_vdev() 1507 zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot, in zpool_create() argument 1525 zcmd_write_conf_nvlist(hdl, &zc, nvroot); in zpool_create() 1551 !zpool_has_special_vdev(nvroot)) { in zpool_create() 1655 if (zpool_has_draid_vdev(nvroot) && in zpool_create() [all …]
|
H A D | libzfs.abi | 6628 <parameter type-id='5ce45b60' name='nvroot'/> 6653 <parameter type-id='5ce45b60' name='nvroot'/> 6792 <parameter type-id='5ce45b60' name='nvroot'/>
|
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/ |
H A D | spa_os.c | 80 nvlist_t *best_cfg, *nvtop, *nvroot; in spa_generate_rootconf() local 152 nvroot = fnvlist_alloc(); in spa_generate_rootconf() 153 fnvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT); in spa_generate_rootconf() 154 fnvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL); in spa_generate_rootconf() 155 fnvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid); in spa_generate_rootconf() 156 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in spa_generate_rootconf() 163 fnvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot); in spa_generate_rootconf() 177 fnvlist_free(nvroot); in spa_generate_rootconf()
|
/freebsd/sys/contrib/openzfs/lib/libzutil/ |
H A D | zutil_import.c | 495 nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot; in get_configs() local 769 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0) in get_configs() 771 if (nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, in get_configs() 773 nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) != 0 || in get_configs() 774 nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, guid) != 0 || in get_configs() 775 nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in get_configs() 777 nvlist_free(nvroot); in get_configs() 791 if (fix_paths(hdl, nvroot, pl->names) != 0) { in get_configs() 792 nvlist_free(nvroot); in get_configs() 800 nvroot) != 0) { in get_configs() [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zed/agents/ |
H A D | zfs_retire.c | 149 nvlist_t *config, *nvroot; in remove_spares() local 160 ZPOOL_CONFIG_VDEV_TREE, &nvroot) != 0) { in remove_spares() 165 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in remove_spares() 213 nvlist_t *config, *nvroot; in find_by_guid() local 225 &nvroot) != 0) { in find_by_guid() 231 if ((*vdevp = find_vdev(zhdl, nvroot, vdev_guid)) == NULL) { in find_by_guid() 248 nvlist_t *config, *nvroot, *replacement; in replace_with_spare() local 257 &nvroot) != 0) in replace_with_spare() 263 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in replace_with_spare()
|
H A D | zfs_mod.c | 117 nvlist_t *nvroot; in zfs_toplevel_state() local 122 ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); in zfs_toplevel_state() 123 verify(nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_VDEV_STATS, in zfs_toplevel_state() 200 nvlist_t *nvroot, *newvd; in zfs_process_add() local 536 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0) { in zfs_process_add() 542 nvlist_free(nvroot); in zfs_process_add() 554 nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT) != 0 || in zfs_process_add() 555 nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zfs_process_add() 559 nvlist_free(nvroot); in zfs_process_add() 574 nvlist_free(nvroot); in zfs_process_add() [all …]
|
/freebsd/cddl/usr.sbin/zfsd/ |
H A D | case_file.cc | 518 nvlist_t *config, *nvroot, *parent_config; in ActivateSpare() local 538 error = nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot); in ActivateSpare() 545 parent_config = find_parent(config, nvroot, m_vdevGUID); in ActivateSpare() 561 nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, &spares, in ActivateSpare() 1126 nvlist_t *nvroot, *newvd; in Replace() local 1166 nvroot = NULL; in Replace() 1169 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0 in Replace() 1173 if (nvroot != NULL) in Replace() 1174 nvlist_free(nvroot); in Replace() 1179 || nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT) != 0 in Replace() [all …]
|
/freebsd/sys/contrib/openzfs/cmd/zpool/ |
H A D | zpool_vdev.c | 216 nvlist_t *nvroot; in is_spare() local 247 &nvroot) == 0); in is_spare() 248 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in is_spare() 489 get_replication(nvlist_t *nvroot, boolean_t fatal) in get_replication() argument 505 verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in get_replication() 824 nvlist_t *nvroot; in check_replication() local 827 &nvroot) == 0); in check_replication() 828 if ((current = get_replication(nvroot, B_FALSE)) == NULL) in check_replication() 1493 nvlist_t *nvroot, *nv, **top, **spares, **l2cache; in construct_spec() local 1508 nvroot = NULL; in construct_spec() [all …]
|
H A D | zpool_main.c | 562 zpool_collect_leaves(zpool_handle_t *zhp, nvlist_t *nvroot, nvlist_t *res) in zpool_collect_leaves() argument 568 (void) nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zpool_collect_leaves() 572 char *path = zpool_vdev_name(g_zfs, zhp, nvroot, in zpool_collect_leaves() 878 nvlist_t *nvroot = fnvlist_lookup_nvlist(config, in zpool_do_initialize() local 880 zpool_collect_leaves(zhp, nvroot, vdevs); in zpool_do_initialize() 1026 nvlist_t *config, *nvroot; in find_spare() local 1030 &nvroot) == 0); in find_spare() 1032 if (find_vdev(nvroot, cbp->cb_guid)) { in find_spare() 1408 nvlist_t *nvroot; in zpool_do_add() local 1529 nvroot = make_root_vdev(zhp, props, !check_inuse, in zpool_do_add() [all …]
|
H A D | zpool_iter.c | 282 nvlist_t *config, *nvroot = NULL; in for_each_vdev() local 286 &nvroot) == 0); in for_each_vdev() 288 return (for_each_vdev_cb((void *) zhp, nvroot, func, data)); in for_each_vdev()
|
/freebsd/sys/contrib/openzfs/lib/libzpool/ |
H A D | util.c | 136 nvlist_t *config, *nvroot; in show_pool_stats() local 142 &nvroot) == 0); in show_pool_stats() 146 show_vdev_stats(name, ZPOOL_CONFIG_CHILDREN, nvroot, 0); in show_pool_stats() 147 show_vdev_stats(NULL, ZPOOL_CONFIG_L2CACHE, nvroot, 0); in show_pool_stats() 148 show_vdev_stats(NULL, ZPOOL_CONFIG_SPARES, nvroot, 0); in show_pool_stats()
|
/freebsd/sys/contrib/openzfs/module/zfs/ |
H A D | spa_config.c | 417 nvlist_t *config, *nvroot; in spa_config_generate() local 517 nvroot = vdev_config_generate(spa, vd, getstats, config_gen_flags); in spa_config_generate() 518 fnvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot); in spa_config_generate() 519 nvlist_free(nvroot); in spa_config_generate()
|
H A D | spa.c | 5953 nvlist_t *nvroot; local 5964 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE); 5968 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, 5970 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, 6003 nvlist_t *nvroot; local 6014 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE); 6018 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, 6020 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, 6214 spa_validate_aux_devs(spa_t *spa, nvlist_t *nvroot, uint64_t crtxg, int mode, argument 6228 if (nvlist_lookup_nvlist_array(nvroot, config, &dev, &ndev) != 0) [all …]
|
H A D | vdev_draid.c | 1673 vdev_draid_spare_create(nvlist_t *nvroot, vdev_t *vd, uint64_t *ndraidp, in vdev_draid_spare_create() argument 1697 error = nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in vdev_draid_spare_create() 1749 (void) nvlist_remove_all(nvroot, ZPOOL_CONFIG_SPARES); in vdev_draid_spare_create() 1750 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in vdev_draid_spare_create()
|
/freebsd/sys/contrib/openzfs/lib/libzfs/os/linux/ |
H A D | libzfs_pool_os.c | 226 nvlist_t *nvroot = fnvlist_lookup_nvlist(zhp->zpool_config, in zpool_label_disk() local 230 start_block = find_start_block(nvroot); in zpool_label_disk()
|
/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/ |
H A D | zutil_import_os.c | 837 nvlist_t *nvroot = NULL; in update_vdevs_config_dev_sysfs_path() local 839 &nvroot) == 0); in update_vdevs_config_dev_sysfs_path() 840 for_each_vdev_in_nvlist(nvroot, sysfs_path_pool_vdev_iter_f, NULL); in update_vdevs_config_dev_sysfs_path()
|
/freebsd/sys/contrib/openzfs/cmd/ |
H A D | ztest.c | 3030 nvlist_t *nvroot; in ztest_spa_create_destroy() local 3038 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy() 3040 spa_create("ztest_bad_file", nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy() 3041 fnvlist_free(nvroot); in ztest_spa_create_destroy() 3046 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 2, 1); in ztest_spa_create_destroy() 3048 spa_create("ztest_bad_mirror", nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy() 3049 fnvlist_free(nvroot); in ztest_spa_create_destroy() 3056 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy() 3058 spa_create(zo->zo_pool, nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy() 3059 fnvlist_free(nvroot); in ztest_spa_create_destroy() [all …]
|
/freebsd/sys/contrib/openzfs/include/ |
H A D | libzutil.h | 269 int for_each_vdev_in_nvlist(nvlist_t *nvroot, pool_vdev_iter_f func,
|
/freebsd/sys/contrib/openzfs/include/sys/ |
H A D | spa.h | 752 extern int spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props, 792 extern int spa_vdev_add(spa_t *spa, nvlist_t *nvroot, boolean_t ashift_check); 793 extern int spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot,
|