mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
spa.h: use IN_BASE instead of IN_FREEBSD_BASE
Consistently get the proper default value for autotrim. Currently, only the kernel module is built with IN_FREEBSD_BASE, and libzfs get the wrong default value, leading to confusion and incorrect output when autotrim value was not set explicitly. Reviewed-by: Warner Losh <imp@bsdimp.com> Signed-off-by: Yuri Pankov <yuripv@FreeBSD.org> Closes #15016
This commit is contained in:
parent
62ace21a14
commit
77a3bb1f47
@ -723,12 +723,12 @@ 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.
|
* NB: IN_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
|
#ifdef IN_BASE
|
||||||
SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_ON,
|
SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_ON,
|
||||||
#else
|
#else
|
||||||
SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_OFF,
|
SPA_AUTOTRIM_DEFAULT = SPA_AUTOTRIM_OFF,
|
||||||
|
Loading…
Reference in New Issue
Block a user