freebsd-nq/module
Brian Behlendorf bbffb59efc
Fix multihost stale cache file import
When the multihost property is enabled it should be impossible to
import an active pool even using the force (-f) option.  This patch
prevents a forced import from succeeding when importing with a
stale cache file.

The root cause of the problem is that the kernel modules trusted
the hostid provided in configuration.  This is always correct when
the configuration is generated by scanning for the pool.  However,
when using an existing cache file the hostid could be stale which
would result in the activity check being skipped.

Resolve the issue by always using the hostid read from the label
configuration where the best uberblock was found.

Reviewed-by: Olaf Faaland <faaland1@llnl.gov>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6933 
Closes #6971
2017-12-18 10:28:27 -08:00
..
avl Remove dead code from AVL tree 2017-10-05 19:28:00 -07:00
icp Linux 4.14 compat: CONFIG_GCC_PLUGIN_RANDSTRUCT 2017-11-28 17:33:48 -06:00
nvpair Linux 4.14 compat: CONFIG_GCC_PLUGIN_RANDSTRUCT 2017-11-28 17:33:48 -06:00
unicode codebase style improvements for OpenZFS 6459 port 2017-01-22 13:25:40 -08:00
zcommon Suppress incorrect objtool warnings 2017-12-07 10:28:50 -08:00
zfs Fix multihost stale cache file import 2017-12-18 10:28:27 -08:00
.gitignore Improve gitignore 2017-05-25 10:14:13 -07:00
Makefile.in Retire legacy test infrastructure 2017-08-15 17:26:38 -07:00