diff options
author | Chunwei Chen <[email protected]> | 2015-01-23 16:05:04 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-02-04 16:44:53 -0800 |
commit | 53698a453d1cc318f99477fef596c476b4b0cb47 (patch) | |
tree | df07069d67116be61722e8c8713e500a61c43fd2 /cmd/zpool | |
parent | aa2ef419e46b3ad7c2ad8848b7a308a5a949aba7 (diff) |
Read spl_hostid module parameter before gethostid()
If spl_hostid is set via module parameter, it's likely different from
gethostid(). Therefore, the userspace tool should read it first before
falling back to gethostid().
Signed-off-by: Chunwei Chen <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3034
Diffstat (limited to 'cmd/zpool')
-rw-r--r-- | cmd/zpool/zpool_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c index db5805bcf..0f2bab6e9 100644 --- a/cmd/zpool/zpool_main.c +++ b/cmd/zpool/zpool_main.c @@ -1917,7 +1917,7 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts, } else if (state != POOL_STATE_EXPORTED && !(flags & ZFS_IMPORT_ANY_HOST)) { uint64_t hostid = 0; - unsigned long system_hostid = gethostid() & 0xffffffff; + unsigned long system_hostid = get_system_hostid(); (void) nvlist_lookup_uint64(config, ZPOOL_CONFIG_HOSTID, &hostid); |