Lines Matching defs:config

35  * examined every device, we pick the best label txg config for each toplevel
36 * vdev. We then arrange these toplevel vdevs into a complete pool config, and
38 * using our derived config, and record the results.
211 nvlist_t *config)
224 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
227 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID, &vdev_guid) == 0) {
242 * If we have a valid config but cannot read any of these fields, then
249 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
251 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
253 nvlist_lookup_uint64(config, ZPOOL_CONFIG_TOP_GUID,
255 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG,
257 nvlist_free(config);
272 nvlist_free(config);
291 nvlist_free(config);
300 * Third, see if we have a config with a matching transaction group. If
311 nvlist_free(config);
315 ce->ce_config = config;
319 nvlist_free(config);
323 * At this point we've successfully added our config to the list of
371 refresh_config(libzfs_handle_t *hdl, nvlist_t *config, boolean_t trusted)
377 if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0)
427 * start by picking the best config for each toplevel vdev. Once that's done,
428 * we assemble the toplevel vdevs into a full config for the pool. We make a
438 nvlist_t *ret = NULL, *config = NULL, *tmp, *nvtop, *nvroot;
462 if (nvlist_alloc(&config, NV_UNIQUE_NAME, 0) != 0)
469 * add them as necessary to the 'vdevs' member of the config.
475 * selecting the config with the latest transaction
494 (void) nvlist_remove(config,
497 (void) nvlist_remove(config,
509 verify(nvlist_add_uint64(config,
518 verify(nvlist_add_uint64_array(config,
540 if (nvlist_add_uint64(config,
545 if (nvlist_add_uint64(config,
550 if (nvlist_add_string(config,
555 if (nvlist_add_uint64(config,
561 if (nvlist_add_uint64(config,
567 if (nvlist_add_string(config,
633 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
732 if (nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
750 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
752 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
759 nvlist_free(config);
760 config = NULL;
764 if ((nvl = refresh_config(hdl, config, B_TRUE)) == NULL) {
765 nvlist_free(config);
766 config = NULL;
770 nvlist_free(config);
771 config = nvl;
777 verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
801 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTID,
803 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTNAME,
806 verify(nvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID,
808 verify(nvlist_add_string(config, ZPOOL_CONFIG_HOSTNAME,
816 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
818 if (nvlist_add_nvlist(ret, name, config) != 0)
822 nvlist_free(config);
823 config = NULL;
836 nvlist_free(config);
861 zpool_read_label(int fd, nvlist_t **config)
868 *config = NULL;
883 sizeof (label->vl_vdev_phys.vp_nvlist), config, 0) != 0)
886 if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE,
888 nvlist_free(*config);
893 (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG,
895 nvlist_free(*config);
904 *config = NULL;
1035 nvlist_t *config;
1074 if ((zpool_read_label(fd, &config)) != 0) {
1082 rn->rn_config = config;
1083 if (config != NULL) {
1442 nvlist_t *config = slice->rn_config;
1448 matched = nvlist_lookup_string(config,
1455 matched = nvlist_lookup_uint64(config,
1461 nvlist_free(config);
1462 config = NULL;
1464 /* Use non-raw path for the config */
1466 slice->rn_path, config)
1588 * using this option, the resulting config won't be complete in the traditional
1832 nvlist_t *config;
1844 if (zpool_read_label(fd, &config) != 0) {
1849 if (config == NULL)
1852 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
1854 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
1858 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
1860 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
1889 nvlist_free(config);
1897 * still present in the config. Otherwise, pretend like
1920 if (ret && nvlist_lookup_uint64(config,
1981 nvlist_free(config);
1990 nvlist_free(config);