]> git.proxmox.com Git - mirror_zfs.git/commit - module/spl/spl-generic.c
Simplify hostid logic
authorRichard Yao <ryao@cs.stonybrook.edu>
Tue, 12 Mar 2013 01:16:36 +0000 (21:16 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 14 Apr 2014 16:04:41 +0000 (09:04 -0700)
commitacf0ade362cb8b26d67770114ee6fa17816e6b65
treefca1cd2bb9cabdfbe11e5daa5d32265ac365be6a
parent3ceb71e8966e5f1895885eeaaa9354ffd940b490
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
include/sys/sysmacros.h
include/sys/systeminfo.h
module/spl/spl-generic.c
module/spl/spl-proc.c