aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/sys/spa.h8
-rw-r--r--module/zcommon/zpool_prop.c2
2 files changed, 8 insertions, 2 deletions
diff --git a/include/sys/spa.h b/include/sys/spa.h
index f0f77cd85..67de57980 100644
--- a/include/sys/spa.h
+++ b/include/sys/spa.h
@@ -733,10 +733,16 @@ typedef enum spa_mode {
* Send TRIM commands in-line during normal pool operation while deleting.
* OFF: no
* ON: yes
+ * NB: IN_FREEBSD_BASE is defined within the FreeBSD sources.
*/
typedef enum {
SPA_AUTOTRIM_OFF = 0, /* default */
- SPA_AUTOTRIM_ON
+ SPA_AUTOTRIM_ON,
+#ifdef IN_FREEBSD_BASE
+ SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_ON,
+#else
+ SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_OFF,
+#endif
} spa_autotrim_t;
/*
diff --git a/module/zcommon/zpool_prop.c b/module/zcommon/zpool_prop.c
index 3cfb435e4..815fad6df 100644
--- a/module/zcommon/zpool_prop.c
+++ b/module/zcommon/zpool_prop.c
@@ -129,7 +129,7 @@ zpool_prop_init(void)
ZIO_FAILURE_MODE_WAIT, PROP_DEFAULT, ZFS_TYPE_POOL,
"wait | continue | panic", "FAILMODE", failuremode_table);
zprop_register_index(ZPOOL_PROP_AUTOTRIM, "autotrim",
- SPA_AUTOTRIM_OFF, PROP_DEFAULT, ZFS_TYPE_POOL,
+ SPA_AUTOTRIM_DEFAULT, PROP_DEFAULT, ZFS_TYPE_POOL,
"on | off", "AUTOTRIM", boolean_table);
/* hidden properties */