Home
last modified time | relevance | path

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

/src/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 …]
/src/sys/contrib/openzfs/lib/libzfs/
H A Dlibzfs_status.c237 nvlist_t *nvroot = fnvlist_lookup_nvlist(config, in check_status() local
239 vdev_stat_t *vs = (vdev_stat_t *)fnvlist_lookup_uint64_array(nvroot, in check_status()
247 (void) nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_SCAN_STATS, in check_status()
260 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in check_status()
378 find_vdev_problem(nvroot, vdev_faulted, NULL, B_TRUE)) in check_status()
382 find_vdev_problem(nvroot, vdev_missing, NULL, B_TRUE)) in check_status()
386 find_vdev_problem(nvroot, vdev_broken, NULL, B_TRUE)) in check_status()
409 if (find_vdev_problem(nvroot, vdev_faulted, NULL, B_TRUE)) in check_status()
411 if (find_vdev_problem(nvroot, vdev_missing, NULL, B_TRUE)) in check_status()
413 if (find_vdev_problem(nvroot, vdev_broken, NULL, 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.c272 nvlist_t *nvroot = fnvlist_lookup_nvlist( in zpool_get_state_str() local
276 nvroot, ZPOOL_CONFIG_VDEV_STATS, &vsc); in zpool_get_state_str()
1431 zpool_has_draid_vdev(nvlist_t *nvroot) in zpool_has_draid_vdev() argument
1436 if (nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in zpool_has_draid_vdev()
1488 zpool_create(libzfs_handle_t *hdl, const char *pool, nvlist_t *nvroot, in zpool_create() argument
1506 zcmd_write_conf_nvlist(hdl, &zc, nvroot); in zpool_create()
1626 if (zpool_has_draid_vdev(nvroot) && in zpool_create()
1774 zpool_add(zpool_handle_t *zhp, nvlist_t *nvroot, boolean_t check_ashift) in zpool_add() argument
1788 nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in zpool_add()
1797 nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE, in zpool_add()
[all …]
H A Dlibzfs.abi6982 <parameter type-id='5ce45b60' name='nvroot'/>
7007 <parameter type-id='5ce45b60' name='nvroot'/>
7071 <parameter type-id='5ce45b60' name='nvroot'/>
7170 <parameter type-id='5ce45b60' name='nvroot'/>
/src/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()
/src/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 …]
/src/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 …]
/src/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()
464 get_replication(nvlist_t *nvroot, boolean_t fatal) in get_replication() argument
480 verify(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_CHILDREN, in get_replication()
804 nvlist_t *nvroot; in check_replication() local
807 &nvroot) == 0); in check_replication()
808 if ((current = get_replication(nvroot, B_FALSE)) == NULL) in check_replication()
1485 nvlist_t *nvroot, *nv, **top, **spares, **l2cache; in construct_spec() local
1523 nvroot = NULL; in construct_spec()
[all …]
H A Dzpool_main.c1020 nvlist_t *config, *nvroot; in find_spare() local
1024 &nvroot) == 0); in find_spare()
1026 if (find_vdev(nvroot, cbp->cb_guid)) { in find_spare()
1403 nvlist_t *nvroot; in zpool_do_add() local
1524 nvroot = make_root_vdev(zhp, props, !check_inuse, in zpool_do_add()
1526 if (nvroot == NULL) { in zpool_do_add()
1547 print_vdev_tree(zhp, NULL, nvroot, 0, "", name_flags); in zpool_do_add()
1553 print_vdev_tree(zhp, NULL, nvroot, 0, in zpool_do_add()
1555 } else if (zfs_special_devs(nvroot, VDEV_ALLOC_BIAS_DEDUP)) { in zpool_do_add()
1556 print_vdev_tree(zhp, "dedup", nvroot, 0, in zpool_do_add()
[all …]
H A Dzpool_iter.c309 nvlist_t *config, *nvroot = NULL; in for_each_vdev() local
313 &nvroot) == 0); in for_each_vdev()
315 return (for_each_vdev_cb((void *) zhp, nvroot, func, data)); in for_each_vdev()
/src/cddl/usr.sbin/zfsd/
H A Dcase_file.cc528 nvlist_t *config, *nvroot, *parent_config; in ActivateSpare() local
548 error = nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot); in ActivateSpare()
555 parent_config = find_parent(config, nvroot, m_vdevGUID); in ActivateSpare()
571 nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, &spares, in ActivateSpare()
1140 nvlist_t *nvroot, *newvd; in Replace() local
1180 nvroot = NULL; in Replace()
1183 if (nvlist_alloc(&nvroot, NV_UNIQUE_NAME, 0) != 0 in Replace()
1187 if (nvroot != NULL) in Replace()
1188 nvlist_free(nvroot); in Replace()
1193 || nvlist_add_string(nvroot, ZPOOL_CONFIG_TYPE, VDEV_TYPE_ROOT) != 0 in Replace()
[all …]
/src/sys/contrib/openzfs/lib/libzpool/
H A Dutil.c138 nvlist_t *config, *nvroot; in show_pool_stats() local
143 VERIFY0(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, &nvroot)); 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()
/src/sys/contrib/openzfs/module/zfs/
H A Dspa_config.c329 nvlist_t *config, *nvroot; in spa_config_generate() local
431 nvroot = vdev_config_generate(spa, vd, getstats, config_gen_flags); in spa_config_generate()
432 fnvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE, nvroot); in spa_config_generate()
433 nvlist_free(nvroot); in spa_config_generate()
H A Dspa.c6588 nvlist_t *nvroot; local
6599 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE);
6603 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES,
6605 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES,
6638 nvlist_t *nvroot; local
6649 nvroot = fnvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE);
6653 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE,
6655 VERIFY0(nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_L2CACHE,
6849 spa_validate_aux_devs(spa_t *spa, nvlist_t *nvroot, uint64_t crtxg, int mode, argument
6863 if (nvlist_lookup_nvlist_array(nvroot, config, &dev, &ndev) != 0)
[all …]
H A Dvdev_draid.c1676 vdev_draid_spare_create(nvlist_t *nvroot, vdev_t *vd, uint64_t *ndraidp, in vdev_draid_spare_create() argument
1700 error = nvlist_lookup_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in vdev_draid_spare_create()
1752 (void) nvlist_remove_all(nvroot, ZPOOL_CONFIG_SPARES); in vdev_draid_spare_create()
1753 fnvlist_add_nvlist_array(nvroot, ZPOOL_CONFIG_SPARES, in vdev_draid_spare_create()
/src/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()
/src/sys/contrib/openzfs/lib/libzutil/os/linux/
H A Dzutil_import_os.c837 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()
/src/sys/contrib/openzfs/cmd/
H A Dztest.c3031 nvlist_t *nvroot; in ztest_spa_create_destroy() local
3039 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy()
3041 spa_create("ztest_bad_file", nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3042 fnvlist_free(nvroot); in ztest_spa_create_destroy()
3047 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 2, 1); in ztest_spa_create_destroy()
3049 spa_create("ztest_bad_mirror", nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3050 fnvlist_free(nvroot); in ztest_spa_create_destroy()
3057 nvroot = make_vdev_root("/dev/bogus", NULL, NULL, 0, 0, NULL, 0, 0, 1); in ztest_spa_create_destroy()
3059 spa_create(zo->zo_pool, nvroot, NULL, NULL, NULL)); in ztest_spa_create_destroy()
3060 fnvlist_free(nvroot); in ztest_spa_create_destroy()
[all …]
/src/sys/contrib/openzfs/include/
H A Dlibzutil.h271 int for_each_vdev_in_nvlist(nvlist_t *nvroot, pool_vdev_iter_f func,
/src/sys/contrib/openzfs/include/sys/
H A Dspa.h779 extern int spa_create(const char *pool, nvlist_t *nvroot, nvlist_t *props,
820 extern int spa_vdev_add(spa_t *spa, nvlist_t *nvroot, boolean_t ashift_check);
821 extern int spa_vdev_attach(spa_t *spa, uint64_t guid, nvlist_t *nvroot,