mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
Simplify hostid logic
There is plenty of compatibility code for a hw_hostid that isn't used by anything. At the same time, there are apparently issues with the current hostid logic. coredumb in #zfsonlinux on freenode reported that Fedora 17 changes its hostid on every boot, which required force importing his pool. A suggestion by wca was to adopt FreeBSD's behavior, where it treats hostid as zero if /etc/hostid does not exist Adopting FreeBSD's behavior permits us to eliminate plenty of code, including a userland helper that invokes the system's hostid as a fallback. Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #224
This commit is contained in:
committed by
Brian Behlendorf
parent
3ceb71e896
commit
acf0ade362
@@ -143,7 +143,6 @@
|
||||
/* Missing globals */
|
||||
extern char spl_version[32];
|
||||
extern unsigned long spl_hostid;
|
||||
extern char hw_serial[11];
|
||||
|
||||
/* Missing misc functions */
|
||||
extern int highbit(unsigned long i);
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
#ifndef _SPL_SYSTEMINFO_H
|
||||
#define _SPL_SYSTEMINFO_H
|
||||
|
||||
#define HW_INVALID_HOSTID 0xFFFFFFFF /* an invalid hostid */
|
||||
#define HW_HOSTID_LEN 11 /* minimum buffer size needed */
|
||||
/* to hold a decimal or hex */
|
||||
/* hostid string */
|
||||
|
||||
Reference in New Issue
Block a user