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.
224 nvlist_t *config)
237 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
240 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID, &vdev_guid) == 0) {
255 * If we have a valid config but cannot read any of these fields, then
262 if (nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
264 nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
266 nvlist_lookup_uint64(config, ZPOOL_CONFIG_TOP_GUID,
268 nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_TXG,
270 nvlist_free(config);
285 nvlist_free(config);
304 nvlist_free(config);
313 * Third, see if we have a config with a matching transaction group. If
324 nvlist_free(config);
328 ce->ce_config = config;
332 nvlist_free(config);
336 * At this point we've successfully added our config to the list of
384 refresh_config(libzfs_handle_t *hdl, nvlist_t *config)
390 if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0)
438 * start by picking the best config for each toplevel vdev. Once that's done,
439 * we assemble the toplevel vdevs into a full config for the pool. We make a
449 nvlist_t *ret = NULL, *config = NULL, *tmp = NULL, *nvtop, *nvroot;
473 if (nvlist_alloc(&config, NV_UNIQUE_NAME, 0) != 0)
480 * add them as necessary to the 'vdevs' member of the config.
486 * selecting the config with the latest transaction
505 (void) nvlist_remove(config,
508 (void) nvlist_remove(config,
520 verify(nvlist_add_uint64(config,
529 verify(nvlist_add_uint64_array(config,
553 fnvlist_add_uint64(config,
557 fnvlist_add_uint64(config,
561 fnvlist_add_string(config,
566 fnvlist_add_string(config,
571 fnvlist_add_uint64(config,
577 fnvlist_add_uint64(config,
581 fnvlist_add_string(config,
645 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
746 if (nvlist_add_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
764 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
766 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
773 nvlist_free(config);
774 config = NULL;
778 if ((nvl = refresh_config(hdl, config)) == NULL) {
779 nvlist_free(config);
780 config = NULL;
784 nvlist_free(config);
785 config = nvl;
791 verify(nvlist_lookup_nvlist(config, ZPOOL_CONFIG_VDEV_TREE,
815 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTID,
817 (void) nvlist_remove(config, ZPOOL_CONFIG_HOSTNAME,
820 verify(nvlist_add_uint64(config, ZPOOL_CONFIG_HOSTID,
822 verify(nvlist_add_string(config, ZPOOL_CONFIG_HOSTNAME,
830 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
832 if (nvlist_add_nvlist(ret, name, config) != 0)
836 nvlist_free(config);
837 config = NULL;
850 nvlist_free(config);
875 zpool_read_label(int fd, nvlist_t **config)
882 *config = NULL;
897 sizeof (label->vl_vdev_phys.vp_nvlist), config, 0) != 0)
900 if (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_STATE,
902 nvlist_free(*config);
907 (nvlist_lookup_uint64(*config, ZPOOL_CONFIG_POOL_TXG,
909 nvlist_free(*config);
918 *config = NULL;
1055 nvlist_t *config;
1116 if ((zpool_read_label(fd, &config)) != 0) {
1123 rn->rn_config = config;
1343 nvlist_t *config = slice->rn_config;
1349 matched = nvlist_lookup_string(config,
1356 matched = nvlist_lookup_uint64(config,
1362 nvlist_free(config);
1365 * use the non-raw path for the config
1370 config) != 0)
1640 nvlist_t *config;
1652 if (zpool_read_label(fd, &config) != 0) {
1657 if (config == NULL)
1660 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE,
1662 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_GUID,
1666 verify(nvlist_lookup_string(config, ZPOOL_CONFIG_POOL_NAME,
1668 verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_GUID,
1704 nvlist_free(config);
1712 * still present in the config. Otherwise, pretend like
1735 if (ret && nvlist_lookup_uint64(config,
1796 nvlist_free(config);
1805 nvlist_free(config);