aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorEtienne Dechamps <[email protected]>2012-07-05 09:22:03 +0200
committerBrian Behlendorf <[email protected]>2012-07-26 15:14:02 -0700
commita9f2397ee9f8c1e2c18072361f1f819155242ed2 (patch)
tree0123e98d984351d9b7fdff9f4a5479e617d7fbde /include/sys
parentc167aadb27d51b7be9ee7bd582e2795061a68480 (diff)
Determine the hostid on demand.
Currently, the SPL tries to determine the hostid at module load. The hostid is usually determined by running the userland program "hostid" during module initialization. Unfortunately, when the module initializes, it may be way too soon to be able to run any userland programs. This is especially true when the module is compiled directly inside the kernel (built-in); in that case, the SPL would try to run hostid when the kernel is still initializing, which of course is doomed to fail. This patch fixes the issue by deferring hostid generation until something actually needs the hostid (that is, when zone_get_hostid() is called), thus switching to a "on-initialization" model to a "on-demand" (lazy loading) model. ZFS only needs the hostid when some pool operations are requested, and this always happens way after the kernel has finished initialization, thus solving the problem. Signed-off-by: Brian Behlendorf <[email protected]> Issue zfsonlinux/zfs#851
Diffstat (limited to 'include/sys')
0 files changed, 0 insertions, 0 deletions