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.c148 print_scan_status(nvlist_t *nvroot, const char *pool_name) in print_scan_status() argument
160 (void) nvlist_lookup_uint64_array(nvroot, in print_scan_status()
263 get_vdev_name(nvlist_t *nvroot, const char *parent_name) in get_vdev_name() argument
269 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_TYPE, &vdev_type); in get_vdev_name()
272 nvroot, ZPOOL_CONFIG_ID, &vdev_id) != 0) in get_vdev_name()
297 get_vdev_desc(nvlist_t *nvroot, const char *parent_name) in get_vdev_desc() argument
306 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_TYPE, &vdev_type); in get_vdev_desc()
307 (void) nvlist_lookup_uint64(nvroot, ZPOOL_CONFIG_ID, &vdev_id); in get_vdev_desc()
308 (void) nvlist_lookup_string(nvroot, ZPOOL_CONFIG_PATH, &vdev_path); in get_vdev_desc()
339 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.c233 nvlist_t *nvroot = fnvlist_lookup_nvlist(config, in check_status() local
235 vdev_stat_t *vs = (vdev_stat_t *)fnvlist_lookup_uint64_array(nvroot, in check_status()
243 (void) nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_SCAN_STATS, in check_status()
256 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in check_status()
374 find_vdev_problem(nvroot, vdev_faulted, B_TRUE)) in check_status()
378 find_vdev_problem(nvroot, vdev_missing, B_TRUE)) in check_status()
382 find_vdev_problem(nvroot, vdev_broken, B_TRUE)) in check_status()
405 if (find_vdev_problem(nvroot, vdev_faulted, B_TRUE)) in check_status()
407 if (find_vdev_problem(nvroot, vdev_missing, B_TRUE)) in check_status()
409 if (find_vdev_problem(nvroot, vdev_broken, B_TRUE)) in check_status()
[all …]
H A Dlibzfs_import.c255 nvlist_t *nvroot = fnvlist_lookup_nvlist(zhp->zpool_config, in find_aux() local
258 if (nvlist_lookup_nvlist_array(nvroot, cbp->cb_type, in find_aux()
355 nvlist_t *nvroot = fnvlist_lookup_nvlist( in zpool_in_use() local
357 ret = find_guid(nvroot, vdev_guid); in zpool_in_use()
H A Dlibzfs_pool.c270 nvlist_t *nvroot = fnvlist_lookup_nvlist( in zpool_get_state_str() local
274 nvroot, ZPOOL_CONFIG_VDEV_STATS, &vsc); in zpool_get_state_str()
1427 zpool_has_special_vdev(nvlist_t *nvroot) in zpool_has_special_vdev() argument
1432 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, &child, in zpool_has_special_vdev()
1451 zpool_has_draid_vdev(nvlist_t *nvroot) in zpool_has_draid_vdev() argument
1456 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zpool_has_draid_vdev()
1508 zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot, in zpool_create() argument
1526 zcmd_write_conf_nvlist(hdl, &zc, nvroot); in zpool_create()
1552 !zpool_has_special_vdev(nvroot)) { in zpool_create()
1656 if (zpool_has_draid_vdev(nvroot) && in zpool_create()
[all …]
H A Dlibzfs.abi6630 <parameter type-id='5ce45b60' name='nvroot'/>
6655 <parameter type-id='5ce45b60' name='nvroot'/>
6794 <parameter type-id='5ce45b60' name='nvroot'/>
/freebsd/sys/contrib/openzfs/module/os/freebsd/zfs/
H A Dspa_os.c81 nvlist_t *best_cfg, *nvtop, *nvroot; in spa_generate_rootconf() local
153 nvroot = fnvlist_alloc(); in spa_generate_rootconf()
154 fnvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT); in spa_generate_rootconf()
155 fnvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL); in spa_generate_rootconf()
156 fnvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, pgid); in spa_generate_rootconf()
157 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in spa_generate_rootconf()
164 fnvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot); in spa_generate_rootconf()
178 fnvlist_free(nvroot); in spa_generate_rootconf()
/freebsd/sys/contrib/openzfs/lib/libzutil/
H A Dzutil_import.c496 nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot; in get_configs() local
770 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0) in get_configs()
772 if (nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, in get_configs()
774 nvlist_add_uint64(nvroot, ZPOOL_CONFIG_ID, 0ULL) != 0 || in get_configs()
775 nvlist_add_uint64(nvroot, ZPOOL_CONFIG_GUID, guid) != 0 || in get_configs()
776 nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in get_configs()
778 nvlist_free(nvroot); in get_configs()
792 if (fix_paths(hdl, nvroot, pl->names) != 0) { in get_configs()
793 nvlist_free(nvroot); in get_configs()
801 nvroot) != 0) { in get_configs()
[all …]
/freebsd/sys/contrib/openzfs/cmd/zed/agents/
H A Dzfs_retire.c150 nvlist_t *config, *nvroot; in remove_spares() local
161 ZPOOL_CONFIG_VDEV_TREE, &nvroot) != 0) { in remove_spares()
166 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in remove_spares()
214 nvlist_t *config, *nvroot; in find_by_guid() local
226 &nvroot) != 0) { in find_by_guid()
232 if ((*vdevp = find_vdev(zhdl, nvroot, vdev_guid)) == NULL) { in find_by_guid()
249 nvlist_t *config, *nvroot, *replacement; in replace_with_spare() local
258 &nvroot) != 0) in replace_with_spare()
264 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in replace_with_spare()
H A Dzfs_mod.c118 nvlist_t *nvroot; in zfs_toplevel_state() local
123 ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0); in zfs_toplevel_state()
124 verify(nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_VDEV_STATS, in zfs_toplevel_state()
201 nvlist_t *nvroot, *newvd; in zfs_process_add() local
539 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0) { in zfs_process_add()
545 nvlist_free(nvroot); in zfs_process_add()
557 nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT) != 0 || in zfs_process_add()
558 nvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zfs_process_add()
562 nvlist_free(nvroot); in zfs_process_add()
577 nvlist_free(nvroot); in zfs_process_add()
[all …]
/freebsd/cddl/usr.sbin/zfsd/
H A Dcase_file.cc518 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 Dzpool_vdev.c217 nvlist_t *nvroot; in is_spare() local
248 &nvroot) == 0); in is_spare()
249 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in is_spare()
490 get_replication(nvlist_t *nvroot, boolean_t fatal) in get_replication() argument
506 verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in get_replication()
825 nvlist_t *nvroot; in check_replication() local
828 &nvroot) == 0); in check_replication()
829 if ((current = get_replication(nvroot, B_FALSE)) == NULL) in check_replication()
1494 nvlist_t *nvroot, *nv, **top, **spares, **l2cache; in construct_spec() local
1509 nvroot = NULL; in construct_spec()
[all …]
H A Dzpool_main.c564 zpool_collect_leaves(zpool_handle_t *zhp, nvlist_t *nvroot, nvlist_t *res) in zpool_collect_leaves() argument
570 (void) nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zpool_collect_leaves()
574 char *path = zpool_vdev_name(g_zfs, zhp, nvroot, in zpool_collect_leaves()
880 nvlist_t *nvroot = fnvlist_lookup_nvlist(config, in zpool_do_initialize() local
882 zpool_collect_leaves(zhp, nvroot, vdevs); in zpool_do_initialize()
1028 nvlist_t *config, *nvroot; in find_spare() local
1032 &nvroot) == 0); in find_spare()
1034 if (find_vdev(nvroot, cbp->cb_guid)) { in find_spare()
1410 nvlist_t *nvroot; in zpool_do_add() local
1531 nvroot = make_root_vdev(zhp, props, !check_inuse, in zpool_do_add()
[all …]
H A Dzpool_iter.c283 nvlist_t *config, *nvroot = NULL; in for_each_vdev() local
287 &nvroot) == 0); in for_each_vdev()
289 return (for_each_vdev_cb((void *) zhp, nvroot, func, data)); in for_each_vdev()
/freebsd/sys/contrib/openzfs/lib/libzpool/
H A Dutil.c137 nvlist_t *config, *nvroot; in show_pool_stats() local
143 &nvroot) == 0); in show_pool_stats()
147 show_vdev_stats(name, ZPOOL_CONFIG_CHILDREN, nvroot, 0); in show_pool_stats()
148 show_vdev_stats(NULL, ZPOOL_CONFIG_L2CACHE, nvroot, 0); in show_pool_stats()
149 show_vdev_stats(NULL, ZPOOL_CONFIG_SPARES, nvroot, 0); in show_pool_stats()
/freebsd/sys/contrib/openzfs/module/zfs/
H A Dspa_config.c418 nvlist_t *config, *nvroot; in spa_config_generate() local
518 nvroot = vdev_config_generate(spa, vd, getstats, config_gen_flags); in spa_config_generate()
519 fnvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot); in spa_config_generate()
520 nvlist_free(nvroot); in spa_config_generate()
H A Dspa.c5962 nvlist_t *nvroot; local
5973 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE);
5977 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES,
5979 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES,
6012 nvlist_t *nvroot; local
6023 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE);
6027 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE,
6029 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE,
6223 spa_validate_aux_devs(spa_t *spa, nvlist_t *nvroot, uint64_t crtxg, int mode, argument
6237 if (nvlist_lookup_nvlist_array(nvroot, config, &dev, &ndev) != 0)
[all …]
H A Dvdev_draid.c1674 vdev_draid_spare_create(nvlist_t *nvroot, vdev_t *vd, uint64_t *ndraidp, in vdev_draid_spare_create() argument
1698 error = nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in vdev_draid_spare_create()
1750 (void) nvlist_remove_all(nvroot, ZPOOL_CONFIG_SPARES); in vdev_draid_spare_create()
1751 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.c227 nvlist_t *nvroot = fnvlist_lookup_nvlist(zhp->zpool_config, in zpool_label_disk() local
231 start_block = find_start_block(nvroot); in zpool_label_disk()
/freebsd/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_import_os.c838 nvlist_t *nvroot = NULL; in update_vdevs_config_dev_sysfs_path() local
840 &nvroot) == 0); in update_vdevs_config_dev_sysfs_path()
841 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.c3032 nvlist_t *nvroot; in ztest_spa_create_destroy() local
3040 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy()
3042 spa_create("ztest_bad_file", nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3043 fnvlist_free(nvroot); in ztest_spa_create_destroy()
3048 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 2, 1); in ztest_spa_create_destroy()
3050 spa_create("ztest_bad_mirror", nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3051 fnvlist_free(nvroot); in ztest_spa_create_destroy()
3058 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy()
3060 spa_create(zo->zo_pool, nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3061 fnvlist_free(nvroot); in ztest_spa_create_destroy()
[all …]
/freebsd/sys/contrib/openzfs/include/
H A Dlibzutil.h270 int for_each_vdev_in_nvlist(nvlist_t *nvroot, pool_vdev_iter_f func,
/freebsd/sys/contrib/openzfs/include/sys/
H A Dspa.h749 extern int spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props,
789 extern int spa_vdev_add(spa_t *spa, nvlist_t *nvroot, boolean_t ashift_check);
790 extern int spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot,