diff options
Diffstat (limited to 'usr/src/uts/intel/zfs')
-rw-r--r-- | usr/src/uts/intel/zfs/Makefile | 8 | ||||
-rw-r--r-- | usr/src/uts/intel/zfs/spa_boot.c | 25 |
2 files changed, 33 insertions, 0 deletions
diff --git a/usr/src/uts/intel/zfs/Makefile b/usr/src/uts/intel/zfs/Makefile index 669ce93ed3..f106577baa 100644 --- a/usr/src/uts/intel/zfs/Makefile +++ b/usr/src/uts/intel/zfs/Makefile @@ -79,6 +79,14 @@ LINTTAGS += -erroff=E_STATIC_UNUSED LINTTAGS += -erroff=E_PTRDIFF_OVERFLOW LINTTAGS += -erroff=E_ASSIGN_NARROW_CONV +CERRWARN += -_gcc=-Wno-type-limits +CERRWARN += -_gcc=-Wno-switch +CERRWARN += -_gcc=-Wno-parentheses +CERRWARN += -_gcc=-Wno-unused-variable +CERRWARN += -_gcc=-Wno-unused-function +CERRWARN += -_gcc=-Wno-unused-label +CERRWARN += -_gcc=-Wno-uninitialized + # # Default build targets. # diff --git a/usr/src/uts/intel/zfs/spa_boot.c b/usr/src/uts/intel/zfs/spa_boot.c index a6cdb81890..adbcffaef0 100644 --- a/usr/src/uts/intel/zfs/spa_boot.c +++ b/usr/src/uts/intel/zfs/spa_boot.c @@ -24,9 +24,16 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2012 by Delphix. All rights reserved. + */ + #include <sys/zio.h> #include <sys/spa.h> #include <sys/sunddi.h> +#include <sys/x86_archext.h> + +extern int zfs_deadman_enabled; char * spa_get_bootprop(char *propname) @@ -44,3 +51,21 @@ spa_free_bootprop(char *value) { ddi_prop_free(value); } + +void +spa_arch_init(void) +{ + /* + * Configure the default settings for the zfs deadman unless + * overriden by /etc/system. + */ + if (zfs_deadman_enabled == -1) { + /* + * Disable the zfs deadman logic on VMware deployments. + */ + if (get_hwenv() == HW_VMWARE) + zfs_deadman_enabled = 0; + else + zfs_deadman_enabled = 1; + } +} |