Lines Matching defs:config

39  * examined every device, we pick the best label txg config for each toplevel
40 * vdev. We then arrange these toplevel vdevs into a complete pool config, and
42 * using our derived config, and record the results.
216 nvlist_t *config)
229 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
232 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID, &vdev_guid) == 0) {
247 * If we have a valid config but cannot read any of these fields, then
254 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
256 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
258 nvlist_lookup_uint64(config, ZPOOL_CONFIG_TOP_GUID,
260 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG,
262 nvlist_free(config);
277 nvlist_free(config);
296 nvlist_free(config);
305 * Third, see if we have a config with a matching transaction group. If
316 nvlist_free(config);
320 ce->ce_config = config;
324 nvlist_free(config);
328 * At this point we've successfully added our config to the list of
376 refresh_config(libzfs_handle_t *hdl, nvlist_t *config)
382 if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0)
430 * start by picking the best config for each toplevel vdev. Once that's done,
431 * we assemble the toplevel vdevs into a full config for the pool. We make a
441 nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot;
465 if (nvlist_alloc(&config, NV_UNIQUE_NAME, 0) != 0)
472 * add them as necessary to the 'vdevs' member of the config.
478 * selecting the config with the latest transaction
497 (void) nvlist_remove(config,
500 (void) nvlist_remove(config,
512 verify(nvlist_add_uint64(config,
521 verify(nvlist_add_uint64_array(config,
545 fnvlist_add_uint64(config,
549 fnvlist_add_uint64(config,
553 fnvlist_add_string(config,
558 fnvlist_add_string(config,
563 fnvlist_add_uint64(config,
569 fnvlist_add_uint64(config,
573 fnvlist_add_string(config,
637 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
738 if (nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
756 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
758 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
765 nvlist_free(config);
766 config = NULL;
770 if ((nvl = refresh_config(hdl, config)) == NULL) {
771 nvlist_free(config);
772 config = NULL;
776 nvlist_free(config);
777 config = nvl;
783 verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
807 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTID,
809 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTNAME,
812 verify(nvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID,
814 verify(nvlist_add_string(config, ZPOOL_CONFIG_HOSTNAME,
822 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
824 if (nvlist_add_nvlist(ret, name, config) != 0)
828 nvlist_free(config);
829 config = NULL;
842 nvlist_free(config);
867 zpool_read_label(int fd, nvlist_t **config)
874 *config = NULL;
889 sizeof (label->vl_vdev_phys.vp_nvlist), config, 0) != 0)
892 if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE,
894 nvlist_free(*config);
899 (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG,
901 nvlist_free(*config);
910 *config = NULL;
1041 nvlist_t *config;
1076 if ((zpool_read_label(fd, &config)) != 0) {
1083 rn->rn_config = config;
1232 nvlist_t *config = slice->rn_config;
1238 matched = nvlist_lookup_string(config,
1245 matched = nvlist_lookup_uint64(config,
1251 nvlist_free(config);
1254 * use the non-raw path for the config
1259 config) != 0)
1529 nvlist_t *config;
1541 if (zpool_read_label(fd, &config) != 0) {
1546 if (config == NULL)
1549 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
1551 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
1555 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
1557 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
1593 nvlist_free(config);
1601 * still present in the config. Otherwise, pretend like
1624 if (ret && nvlist_lookup_uint64(config,
1685 nvlist_free(config);
1694 nvlist_free(config);