diff options
author | pjd <pjd@FreeBSD.org> | 2007-04-17 17:57:34 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2007-04-17 17:57:34 +0000 |
commit | 934b1fc38b7f6579acc5a3c08451320417880ce3 (patch) | |
tree | 7662d3bb71e390d6c2dcb9bd8ecec00daeb1c697 | |
parent | f0a8f88e532b914ad68f0db198a54742e4e28c27 (diff) | |
download | FreeBSD-src-934b1fc38b7f6579acc5a3c08451320417880ce3.zip FreeBSD-src-934b1fc38b7f6579acc5a3c08451320417880ce3.tar.gz |
Ignore hostid check for root-on-ZFS configurations. Making hostid available
before the root is mounted is tricky and having it in /boot/ is not really
desire.
Reported by: Zephiris <zephiris@gmail.com>
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c | 6 | ||||
-rw-r--r-- | sys/contrib/opensolaris/uts/common/fs/zfs/spa.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c index 0e649bb..f8d9465 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -598,8 +598,12 @@ spa_load(spa_t *spa, nvlist_t *config, spa_load_state_t state, int mosconfig) goto out; } + /* + * hostid is set after the root file system is mounted, so + * ignore the check until it's done. + */ if (nvlist_lookup_uint64(newconfig, ZPOOL_CONFIG_HOSTID, - &hostid) == 0) { + &hostid) == 0 && root_mounted()) { char *hostname; unsigned long myhostid = 0; diff --git a/sys/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/contrib/opensolaris/uts/common/fs/zfs/spa.c index 0e649bb..f8d9465 100644 --- a/sys/contrib/opensolaris/uts/common/fs/zfs/spa.c +++ b/sys/contrib/opensolaris/uts/common/fs/zfs/spa.c @@ -598,8 +598,12 @@ spa_load(spa_t *spa, nvlist_t *config, spa_load_state_t state, int mosconfig) goto out; } + /* + * hostid is set after the root file system is mounted, so + * ignore the check until it's done. + */ if (nvlist_lookup_uint64(newconfig, ZPOOL_CONFIG_HOSTID, - &hostid) == 0) { + &hostid) == 0 && root_mounted()) { char *hostname; unsigned long myhostid = 0; |