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 <tuxoko@gmail.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3034
This commit is contained in:
Chunwei Chen
2015-01-23 16:05:04 +08:00
committed by Brian Behlendorf
parent aa2ef419e4
commit 53698a453d
4 changed files with 28 additions and 3 deletions
+1
View File
@@ -350,6 +350,7 @@ typedef enum {
ZPOOL_STATUS_OK
} zpool_status_t;
extern unsigned long get_system_hostid(void);
extern zpool_status_t zpool_get_status(zpool_handle_t *, char **,
zpool_errata_t *);
extern zpool_status_t zpool_import_status(nvlist_t *, char **,