X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=lib%2Flibzfs%2Flibzfs_status.c;h=d56baf0bffd9bc765c8865929c3cad5eb6f8c5c5;hb=34037afe24e0bff97cf5262f8f1a76f5e0815dc1;hp=24725ec044ecfe6de6ce8a3ee3631ada0197a236;hpb=428870ff734fdaccc342b33fc53cf94724409a46;p=zfs.git diff --git a/lib/libzfs/libzfs_status.c b/lib/libzfs/libzfs_status.c index 24725ec..d56baf0 100644 --- a/lib/libzfs/libzfs_status.c +++ b/lib/libzfs/libzfs_status.c @@ -179,6 +179,7 @@ check_status(nvlist_t *config, boolean_t isimport) uint64_t stateval; uint64_t suspended; uint64_t hostid = 0; + unsigned long system_hostid = gethostid() & 0xffffffff; verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); @@ -202,7 +203,7 @@ check_status(nvlist_t *config, boolean_t isimport) * Pool last accessed by another system. */ (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid); - if (hostid != 0 && (unsigned long)hostid != gethostid() && + if (hostid != 0 && (unsigned long)hostid != system_hostid && stateval == POOL_STATE_ACTIVE) return (ZPOOL_STATUS_HOSTID_MISMATCH);