mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Add define to enable autotrim to default to on
In FreeBSD trim has defaulted to on for several years. In order to minimize POLA violations on import it's important to maintain this default when importing vendored openzfs in to FreeBSD base. Reviewed-by: Ryan Moeller <ryan@iXsystems.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matt Macy <mmacy@FreeBSD.org> Closes #10719
This commit is contained in:
parent
009cc8e884
commit
5e7eaf8fbd
@ -733,10 +733,16 @@ typedef enum spa_mode {
|
|||||||
* Send TRIM commands in-line during normal pool operation while deleting.
|
* Send TRIM commands in-line during normal pool operation while deleting.
|
||||||
* OFF: no
|
* OFF: no
|
||||||
* ON: yes
|
* ON: yes
|
||||||
|
* NB: IN_FREEBSD_BASE is defined within the FreeBSD sources.
|
||||||
*/
|
*/
|
||||||
typedef enum {
|
typedef enum {
|
||||||
SPA_AUTOTRIM_OFF = 0, /* default */
|
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;
|
} spa_autotrim_t;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -129,7 +129,7 @@ zpool_prop_init(void)
|
|||||||
ZIO_FAILURE_MODE_WAIT, PROP_DEFAULT, ZFS_TYPE_POOL,
|
ZIO_FAILURE_MODE_WAIT, PROP_DEFAULT, ZFS_TYPE_POOL,
|
||||||
"wait | continue | panic", "FAILMODE", failuremode_table);
|
"wait | continue | panic", "FAILMODE", failuremode_table);
|
||||||
zprop_register_index(ZPOOL_PROP_AUTOTRIM, "autotrim",
|
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);
|
"on | off", "AUTOTRIM", boolean_table);
|
||||||
|
|
||||||
/* hidden properties */
|
/* hidden properties */
|
||||||
|
Loading…
Reference in New Issue
Block a user