Changeset View
Changeset View
Standalone View
Standalone View
head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_status.c
Show First 20 Lines • Show All 213 Lines • ▼ Show 20 Lines | check_status(nvlist_t *config, boolean_t isimport) | ||||
verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, | verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_POOL_STATE, | ||||
&stateval) == 0); | &stateval) == 0); | ||||
/* | /* | ||||
* Currently resilvering a vdev | * Currently resilvering a vdev | ||||
*/ | */ | ||||
(void) nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_SCAN_STATS, | (void) nvlist_lookup_uint64_array(nvroot, ZPOOL_CONFIG_SCAN_STATS, | ||||
(uint64_t **)&ps, &psc); | (uint64_t **)&ps, &psc); | ||||
if (ps && ps->pss_func == POOL_SCAN_RESILVER && | if (ps != NULL && ps->pss_func == POOL_SCAN_RESILVER && | ||||
ps->pss_state == DSS_SCANNING) | ps->pss_state == DSS_SCANNING) | ||||
return (ZPOOL_STATUS_RESILVERING); | return (ZPOOL_STATUS_RESILVERING); | ||||
/* | /* | ||||
* Pool last accessed by another system. | * Pool last accessed by another system. | ||||
*/ | */ | ||||
(void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid); | (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid); | ||||
if (hostid != 0 && (unsigned long)hostid != gethostid() && | if (hostid != 0 && (unsigned long)hostid != gethostid() && | ||||
▲ Show 20 Lines • Show All 237 Lines • Show Last 20 Lines |