mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
set autotrim default to 'off' everywhere
As it turns out having autotrim default to 'on' on FreeBSD never really worked due to mess with defines where userland and kernel module were getting different default values (userland was defaulting to 'off', module was thinking it's 'on'). Reviewed-by: Tino Reichardt <milky-zfs@mcmilk.de> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Yuri Pankov <yuripv@FreeBSD.org> Closes #15079
This commit is contained in:
parent
d3d63cac4d
commit
8beabfd3bf
@ -723,16 +723,10 @@ 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,
|
||||
#ifdef IN_FREEBSD_BASE
|
||||
SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_ON,
|
||||
#else
|
||||
SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_OFF,
|
||||
#endif
|
||||
} spa_autotrim_t;
|
||||
|
||||
/*
|
||||
|
@ -160,7 +160,7 @@ zpool_prop_init(void)
|
||||
"wait | continue | panic", "FAILMODE", failuremode_table,
|
||||
sfeatures);
|
||||
zprop_register_index(ZPOOL_PROP_AUTOTRIM, "autotrim",
|
||||
SPA_AUTOTRIM_DEFAULT, PROP_DEFAULT, ZFS_TYPE_POOL,
|
||||
SPA_AUTOTRIM_OFF, PROP_DEFAULT, ZFS_TYPE_POOL,
|
||||
"on | off", "AUTOTRIM", boolean_table, sfeatures);
|
||||
|
||||
/* hidden properties */
|
||||
|
Loading…
Reference in New Issue
Block a user