Home
last modified time | relevance | path

Searched refs:nvroot (Results 1 – 22 of 22) sorted by relevance

/freebsd/sys/contrib/openzfs/cmd/zpool_influxdb/
H A Dzpool_influxdb.c140 print_scan_status(nvlist_t *nvroot, const char *pool_name) in print_scan_status() argument
152 (void) nvlist_lookup_uint64_array(nvroot, in print_scan_status()
255 get_vdev_name(nvlist_t *nvroot, const char *parent_name) in get_vdev_name() argument
261 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_TYPE, &vdev_type); in get_vdev_name()
264 nvroot, ZPOOL_CONFIG_ID, &vdev_id) != 0) in get_vdev_name()
289 get_vdev_desc(nvlist_t *nvroot, const char *parent_name) in get_vdev_desc() argument
298 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_TYPE, &vdev_type); in get_vdev_desc()
299 (void) nvlist_lookup_uint64(nvroot, ZPOOL_CONFIG_ID, &vdev_id); in get_vdev_desc()
300 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_PATH, &vdev_path); in get_vdev_desc()
331 print_summary_stats(nvlist_t *nvroot, const char *pool_name, in print_summary_stats() argument
[all …]
/freebsd/sys/contrib/openzfs/lib/libzfs/
H A Dlibzfs_status.c250 nvlist_t *nvroot = fnvlist_lookup_nvlist(config, in check_status() local
252 vdev_stat_t *vs = (vdev_stat_t *)fnvlist_lookup_uint64_array(nvroot, in check_status()
260 (void) nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_SCAN_STATS, in check_status()
273 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in check_status()
391 find_vdev_problem(nvroot, vdev_faulted, NULL, B_TRUE)) in check_status()
395 find_vdev_problem(nvroot, vdev_missing, NULL, B_TRUE)) in check_status()
399 find_vdev_problem(nvroot, vdev_broken, NULL, B_TRUE)) in check_status()
422 if (find_vdev_problem(nvroot, vdev_faulted, NULL, B_TRUE) == EDOM) in check_status()
424 if (find_vdev_problem(nvroot, vdev_missing, NULL, B_TRUE) == EDOM) in check_status()
426 if (find_vdev_problem(nvroot, vdev_faulted, NULL, B_TRUE)) in check_status()
[all …]
H A Dlibzfs_import.c245 nvlist_t *nvroot = fnvlist_lookup_nvlist(zhp->zpool_config, in find_aux() local
248 if (nvlist_lookup_nvlist_array(nvroot, cbp->cb_type, in find_aux()
345 nvlist_t *nvroot = fnvlist_lookup_nvlist( in zpool_in_use() local
347 ret = find_guid(nvroot, vdev_guid); in zpool_in_use()
H A Dlibzfs_pool.c263 nvlist_t *nvroot = fnvlist_lookup_nvlist( in zpool_get_state_str() local
267 nvroot, ZPOOL_CONFIG_VDEV_STATS, &vsc); in zpool_get_state_str()
1479 zpool_has_draid_vdev(nvlist_t *nvroot) in zpool_has_draid_vdev() argument
1484 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zpool_has_draid_vdev()
1586 zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot, in zpool_create() argument
1604 zcmd_write_conf_nvlist(hdl, &zc, nvroot); in zpool_create()
1723 if (zpool_has_draid_vdev(nvroot) && in zpool_create()
1884 zpool_add(zpool_handle_t *zhp, nvlist_t *nvroot, boolean_t check_ashift) in zpool_add() argument
1898 nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in zpool_add()
1907 nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, in zpool_add()
[all …]
H A Dlibzfs.abi7163 <parameter type-id='5ce45b60' name='nvroot'/>
7188 <parameter type-id='5ce45b60' name='nvroot'/>
7256 <parameter type-id='5ce45b60' name='nvroot'/>
7356 <parameter type-id='5ce45b60' name='nvroot'/>
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/
H A Dspa_os.c71 nvlist_t *best_cfg, *nvtop, *nvroot; in spa_generate_rootconf() local
143 nvroot = fnvlist_alloc(); in spa_generate_rootconf()
144 fnvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT); in spa_generate_rootconf()
145 fnvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL); in spa_generate_rootconf()
146 fnvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid); in spa_generate_rootconf()
147 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in spa_generate_rootconf()
154 fnvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot); in spa_generate_rootconf()
168 fnvlist_free(nvroot); in spa_generate_rootconf()
/freebsd/sys/contrib/openzfs/lib/libzutil/
H A Dzutil_import.c558 nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot; in get_configs() local
832 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0) in get_configs()
834 if (nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, in get_configs()
836 nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) != 0 || in get_configs()
837 nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, guid) != 0 || in get_configs()
838 nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in get_configs()
840 nvlist_free(nvroot); in get_configs()
854 if (fix_paths(hdl, nvroot, pl->names) != 0) { in get_configs()
855 nvlist_free(nvroot); in get_configs()
863 nvroot) != 0) { in get_configs()
[all …]
/freebsd/cddl/usr.sbin/zfsd/
H A Dcase_file.cc593 nvlist_t *config, *nvroot, *parent_config; in ActivateSpare() local
618 error = nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot); in ActivateSpare()
625 parent_config = find_parent(config, nvroot, m_vdevGUID); in ActivateSpare()
651 nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, &spares, in ActivateSpare()
1258 nvlist_t *nvroot, *newvd; in Replace() local
1298 nvroot = NULL; in Replace()
1301 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0 in Replace()
1305 if (nvroot != NULL) in Replace()
1306 nvlist_free(nvroot); in Replace()
1311 || nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT) != 0 in Replace()
[all …]
/freebsd/sys/contrib/openzfs/cmd/zed/agents/
H A Dzfs_mod.c108 nvlist_t *nvroot; in zfs_toplevel_state() local
113 ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); in zfs_toplevel_state()
114 verify(nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_VDEV_STATS, in zfs_toplevel_state()
191 nvlist_t *nvroot, *newvd; in zfs_process_add() local
529 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0) { in zfs_process_add()
535 nvlist_free(nvroot); in zfs_process_add()
547 nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT) != 0 || in zfs_process_add()
548 nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zfs_process_add()
552 nvlist_free(nvroot); in zfs_process_add()
567 nvlist_free(nvroot); in zfs_process_add()
[all …]
H A Dzfs_retire.c153 nvlist_t *config, *nvroot; in remove_spares() local
164 ZPOOL_CONFIG_VDEV_TREE, &nvroot) != 0) { in remove_spares()
169 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in remove_spares()
218 nvlist_t *config, *nvroot; in find_by_guid_impl() local
230 &nvroot) != 0) { in find_by_guid_impl()
238 if ((*vdevp = find_vdev(zhdl, nvroot, vdev_guid, in find_by_guid_impl()
405 nvlist_t *config, *nvroot, *replacement; in replace_with_spare() local
418 &nvroot) != 0) in replace_with_spare()
424 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in replace_with_spare()
/freebsd/sys/contrib/openzfs/cmd/zpool/
H A Dzpool_main.c1046 nvlist_t *config, *nvroot; in find_spare() local
1050 &nvroot) == 0); in find_spare()
1052 if (find_vdev(nvroot, cbp->cb_guid)) { in find_spare()
1429 nvlist_t *nvroot; in zpool_do_add() local
1550 nvroot = make_root_vdev(zhp, props, !check_inuse, in zpool_do_add()
1552 if (nvroot == NULL) { in zpool_do_add()
1573 print_vdev_tree(zhp, NULL, nvroot, 0, "", name_flags); in zpool_do_add()
1579 print_vdev_tree(zhp, NULL, nvroot, 0, in zpool_do_add()
1581 } else if (zfs_special_devs(nvroot, VDEV_ALLOC_BIAS_DEDUP)) { in zpool_do_add()
1582 print_vdev_tree(zhp, "dedup", nvroot, 0, in zpool_do_add()
[all …]
H A Dzpool_vdev.c207 nvlist_t *nvroot; in is_spare() local
238 &nvroot) == 0); in is_spare()
239 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in is_spare()
454 get_replication(nvlist_t *nvroot, boolean_t fatal) in get_replication() argument
470 verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in get_replication()
794 nvlist_t *nvroot; in check_replication() local
797 &nvroot) == 0); in check_replication()
798 if ((current = get_replication(nvroot, B_FALSE)) == NULL) in check_replication()
1544 nvlist_t *nvroot, *nv, **top, **spares, **l2cache; in construct_spec() local
1582 nvroot = NULL; in construct_spec()
[all …]
H A Dzpool_iter.c299 nvlist_t *config, *nvroot = NULL; in for_each_vdev() local
303 &nvroot) == 0); in for_each_vdev()
305 return (for_each_vdev_cb((void *) zhp, nvroot, func, data)); in for_each_vdev()
/freebsd/sys/contrib/openzfs/lib/libzpool/
H A Dutil.c128 nvlist_t *config, *nvroot; in show_pool_stats() local
133 VERIFY0(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot)); in show_pool_stats()
136 show_vdev_stats(name, ZPOOL_CONFIG_CHILDREN, nvroot, 0); in show_pool_stats()
137 show_vdev_stats(NULL, ZPOOL_CONFIG_L2CACHE, nvroot, 0); in show_pool_stats()
138 show_vdev_stats(NULL, ZPOOL_CONFIG_SPARES, nvroot, 0); in show_pool_stats()
/freebsd/sys/contrib/openzfs/module/zfs/
H A Dspa_config.c319 nvlist_t *config, *nvroot; in spa_config_generate() local
421 nvroot = vdev_config_generate(spa, vd, getstats, config_gen_flags); in spa_config_generate()
422 fnvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot); in spa_config_generate()
423 nvlist_free(nvroot); in spa_config_generate()
H A Dspa.c6688 nvlist_t *nvroot; local
6699 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE);
6703 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES,
6705 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES,
6738 nvlist_t *nvroot; local
6749 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE);
6753 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE,
6755 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE,
6949 spa_validate_aux_devs(spa_t *spa, nvlist_t *nvroot, uint64_t crtxg, int mode, argument
6963 if (nvlist_lookup_nvlist_array(nvroot, config, &dev, &ndev) != 0)
[all …]
H A Dvdev_draid.c1856 vdev_draid_spare_create(nvlist_t *nvroot, vdev_t *vd, uint64_t *ndraidp, in vdev_draid_spare_create() argument
1884 error = nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in vdev_draid_spare_create()
1936 (void) nvlist_remove_all(nvroot, ZPOOL_CONFIG_SPARES); in vdev_draid_spare_create()
1937 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in vdev_draid_spare_create()
/freebsd/sys/contrib/openzfs/lib/libzfs/os/linux/
H A Dlibzfs_pool_os.c217 nvlist_t *nvroot = fnvlist_lookup_nvlist(zhp->zpool_config, in zpool_label_disk() local
221 start_block = find_start_block(nvroot); in zpool_label_disk()
/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_import_os.c868 nvlist_t *nvroot = NULL; in update_vdevs_config_dev_sysfs_path() local
870 &nvroot) == 0); in update_vdevs_config_dev_sysfs_path()
871 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 Dztest.c3037 nvlist_t *nvroot; in ztest_spa_create_destroy() local
3045 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy()
3047 spa_create("ztest_bad_file", nvroot, NULL, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3048 fnvlist_free(nvroot); in ztest_spa_create_destroy()
3053 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 2, 1); in ztest_spa_create_destroy()
3055 spa_create("ztest_bad_mirror", nvroot, NULL, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3056 fnvlist_free(nvroot); in ztest_spa_create_destroy()
3063 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy()
3065 spa_create(zo->zo_pool, nvroot, NULL, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3066 fnvlist_free(nvroot); in ztest_spa_create_destroy()
[all …]
/freebsd/sys/contrib/openzfs/include/
H A Dlibzutil.h262 int for_each_vdev_in_nvlist(nvlist_t *nvroot, pool_vdev_iter_f func,
/freebsd/sys/contrib/openzfs/include/sys/
H A Dspa.h771 extern int spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props,
812 extern int spa_vdev_add(spa_t *spa, nvlist_t *nvroot, boolean_t ashift_check);
813 extern int spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot,