Author: pjd Date: Thu Feb 18 22:31:43 2010 New Revision: 204073 URL: http://svn.freebsd.org/changeset/base/204073
Log: Add tunable and sysctl to skip hostid check on pool import. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Feb 18 22:30:37 2010 (r204072) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Thu Feb 18 22:31:43 2010 (r204073) @@ -62,6 +62,14 @@ #include "zfs_prop.h" #include "zfs_comutil.h" +/* Check hostid on import? */ +static int check_hostid = 1; + +SYSCTL_DECL(_vfs_zfs); +TUNABLE_INT("vfs.zfs.check_hostid", &check_hostid); +SYSCTL_INT(_vfs_zfs, OID_AUTO, check_hostid, CTLFLAG_RW, &check_hostid, 0, + "Check hostid on import?"); + int zio_taskq_threads[ZIO_TYPES][ZIO_TASKQ_TYPES] = { /* ISSUE INTR */ { 1, 1 }, /* ZIO_TYPE_NULL */ @@ -1168,7 +1176,7 @@ spa_load(spa_t *spa, nvlist_t *config, s ZPOOL_CONFIG_HOSTNAME, &hostname) == 0); (void) ddi_strtoul(hw_serial, NULL, 10, &myhostid); - if (hostid != 0 && myhostid != 0 && + if (check_hostid && hostid != 0 && myhostid != 0 && (unsigned long)hostid != myhostid) { cmn_err(CE_WARN, "pool '%s' could not be " "loaded as it was last accessed by " _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"