Lines Matching defs:config

37  * examined every device, we pick the best label txg config for each toplevel
38 * vdev. We then arrange these toplevel vdevs into a complete pool config, and
40 * using our derived config, and record the results.
214 nvlist_t *config)
227 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
230 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID, &vdev_guid) == 0) {
245 * If we have a valid config but cannot read any of these fields, then
252 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
254 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
256 nvlist_lookup_uint64(config, ZPOOL_CONFIG_TOP_GUID,
258 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG,
260 nvlist_free(config);
275 nvlist_free(config);
294 nvlist_free(config);
303 * Third, see if we have a config with a matching transaction group. If
314 nvlist_free(config);
318 ce->ce_config = config;
322 nvlist_free(config);
326 * At this point we've successfully added our config to the list of
374 refresh_config(libzfs_handle_t *hdl, nvlist_t *config)
380 if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0)
428 * start by picking the best config for each toplevel vdev. Once that's done,
429 * we assemble the toplevel vdevs into a full config for the pool. We make a
439 nvlist_t *ret = NULL, *config = NULL, *tmp, *nvtop, *nvroot;
463 if (nvlist_alloc(&config, NV_UNIQUE_NAME, 0) != 0)
470 * add them as necessary to the 'vdevs' member of the config.
476 * selecting the config with the latest transaction
495 (void) nvlist_remove(config,
498 (void) nvlist_remove(config,
510 verify(nvlist_add_uint64(config,
519 verify(nvlist_add_uint64_array(config,
543 fnvlist_add_uint64(config,
547 fnvlist_add_uint64(config,
551 fnvlist_add_string(config,
556 fnvlist_add_string(config,
561 fnvlist_add_uint64(config,
567 fnvlist_add_uint64(config,
571 fnvlist_add_string(config,
635 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
734 if (nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
752 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
754 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
761 nvlist_free(config);
762 config = NULL;
766 if ((nvl = refresh_config(hdl, config)) == NULL) {
767 nvlist_free(config);
768 config = NULL;
772 nvlist_free(config);
773 config = nvl;
779 verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
803 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTID,
805 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTNAME,
808 verify(nvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID,
810 verify(nvlist_add_string(config, ZPOOL_CONFIG_HOSTNAME,
818 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
820 if (nvlist_add_nvlist(ret, name, config) != 0)
824 nvlist_free(config);
825 config = NULL;
838 nvlist_free(config);
863 zpool_read_label(int fd, nvlist_t **config)
870 *config = NULL;
885 sizeof (label->vl_vdev_phys.vp_nvlist), config, 0) != 0)
888 if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE,
890 nvlist_free(*config);
895 (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG,
897 nvlist_free(*config);
906 *config = NULL;
1043 nvlist_t *config;
1085 if ((zpool_read_label(fd, &config)) != 0) {
1093 rn->rn_config = config;
1094 if (config != NULL) {
1276 nvlist_t *config = slice->rn_config;
1282 matched = nvlist_lookup_string(config,
1289 matched = nvlist_lookup_uint64(config,
1295 nvlist_free(config);
1296 config = NULL;
1299 /* use the non-raw path for the config */
1301 if (add_config(hdl, &pools, path, config) != 0)
1573 nvlist_t *config;
1585 if (zpool_read_label(fd, &config) != 0) {
1590 if (config == NULL)
1593 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
1595 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
1599 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
1601 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
1637 nvlist_free(config);
1645 * still present in the config. Otherwise, pretend like
1668 if (ret && nvlist_lookup_uint64(config,
1729 nvlist_free(config);
1738 nvlist_free(config);