From nobody Tue Jul 18 09:21:38 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4R4tkB431nz4kPWv; Tue, 18 Jul 2023 09:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4R4tkB3W9kz3MXp; Tue, 18 Jul 2023 09:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689672098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w3WY8bSwFc4VwI7QML9KTFysgTWDN2WjJxwynwYi4xc=; b=hOxXRl6m9btUH+Q2sbfAG87WBF1b53k7aspySIbGhfvcwR7rJHBJv7z7MZdkgG28+3ZJIA iAr8qQrnyoEG1Z5DhJz1Y4AvtXsjL0zC16D3VU2xMMH5xdeEYgJ0L+ba8HC9ZI20vc7kMM 2oq+Qu+8/KQwZ2yIVcSLyD/JAKRGldJ0vR4LLS2y8wfVtbA89grz0SqqMVCacuqzru3VgK uSucAT2P6DZysnTZSiKGlCcGTlAH/6QEjZkyCCbTRKvhX9DnOg8TAHdbS0Ah69g7NkXaCL 9P/BmjTPWX4j3RyVsPmmMtNJSWomNuW7UNz2vkW1oA860a08UJJxSaMMbArWkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689672098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w3WY8bSwFc4VwI7QML9KTFysgTWDN2WjJxwynwYi4xc=; b=w4LoU0QMWuRdXHyZHspC0FLmIdNs6NegOTDWS6oPQoasw+L7/hn5e4jO7bEqNTKHLWe5VY xR1GjtNxTRAQKTrG8+fGgPx8QHEdp307X4gP93kDdmTLFJ9CNon6ETjPZEJ1Oo5L8md1vB y+hCm5lan576kpG7GCFcXV8S5OerAg8oAMY+jFr9MIGMrzq0gj8tVjgR1OH9gCvMrg8niW Y+AO8igdz+lHWkN9nCprBZ0PAFVjypl95495g9whjMcvcit2ViJ+NWgZ0/Z/pzytsy1jOV WW2634G/HZQnAUQYBAnlwu9reCC+h33skzmDJSK4MebRFJUwuEQNnTTBNFEywg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689672098; a=rsa-sha256; cv=none; b=wt2eROGLzT5HzfOPWsga77Hc+nrbkHMEsn3FYKiUSyVhM7yFOAZs5CmedP4oFaghFxTp9P Nx5tcYbYm0S27KGuXVT49i7Ma1m1oJOZ/VTtFycAI0PCYrCFw4HgFspxb7hX9rxKUjsW5a zJpzABkBi5al5Yx0gFGtFjh/1f9SoLZAuyO1bEij2AZXKKmQ4Pe+QWFCEl7JOfwydR6YG1 kL3cn+br4VtJozCRIfP1TXhfV9YZ1aUnDMR43qj/aY9RHw+QsP2tmFzflIXJLsjjvqdBpd k3vqv1vr6YREA98KDgw4ViJR4uJcmCYalnzy3tM/wHyTRXshFh3951Bt/Tq9Bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4R4tkB2YzHz10Zd; Tue, 18 Jul 2023 09:21:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 36I9LcQk030474; Tue, 18 Jul 2023 09:21:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36I9LcWP030473; Tue, 18 Jul 2023 09:21:38 GMT (envelope-from git) Date: Tue, 18 Jul 2023 09:21:38 GMT Message-Id: <202307180921.36I9LcWP030473@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Yuri Pankov Subject: git: b36f469a15ec - main - zfs: set autotrim default to 'off' List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuripv X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b36f469a15ecf508a2fdc2b58a76f0f2b4a0b88d Auto-Submitted: auto-generated The branch main has been updated by yuripv: URL: https://cgit.FreeBSD.org/src/commit/?id=b36f469a15ecf508a2fdc2b58a76f0f2b4a0b88d commit b36f469a15ecf508a2fdc2b58a76f0f2b4a0b88d Author: Yuri Pankov AuthorDate: 2023-07-17 09:12:53 +0000 Commit: Yuri Pankov CommitDate: 2023-07-18 09:20:11 +0000 zfs: set autotrim default to 'off' 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'). PR: 264234 Reviewed by: mav (zfs) Differential Revision: https://reviews.freebsd.org/D41056 --- sys/conf/kern.pre.mk | 3 +-- sys/contrib/openzfs/include/sys/spa.h | 6 ------ sys/contrib/openzfs/module/zcommon/zpool_prop.c | 2 +- sys/modules/zfs/Makefile | 2 +- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index e401a652bf97..8314f4489ca8 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -252,8 +252,7 @@ CDDL_C= ${CC} -c ${CDDL_CFLAGS} ${WERROR} ${.IMPSRC} # Special flags for managing the compat compiles for ZFS ZFS_CFLAGS+= -I$S/contrib/openzfs/module/icp/include \ ${CDDL_CFLAGS} -DBUILDING_ZFS -DHAVE_UIO_ZEROCOPY \ - -DWITH_NETDUMP -D__KERNEL__ -D_SYS_CONDVAR_H_ -DSMP \ - -DIN_FREEBSD_BASE + -DWITH_NETDUMP -D__KERNEL__ -D_SYS_CONDVAR_H_ -DSMP .if ${MACHINE_ARCH} == "amd64" ZFS_CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \ diff --git a/sys/contrib/openzfs/include/sys/spa.h b/sys/contrib/openzfs/include/sys/spa.h index 1fa2044008dc..b90855687411 100644 --- a/sys/contrib/openzfs/include/sys/spa.h +++ b/sys/contrib/openzfs/include/sys/spa.h @@ -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; /* diff --git a/sys/contrib/openzfs/module/zcommon/zpool_prop.c b/sys/contrib/openzfs/module/zcommon/zpool_prop.c index 459ff62fc996..c4aca04a96bd 100644 --- a/sys/contrib/openzfs/module/zcommon/zpool_prop.c +++ b/sys/contrib/openzfs/module/zcommon/zpool_prop.c @@ -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 */ diff --git a/sys/modules/zfs/Makefile b/sys/modules/zfs/Makefile index 2cfdf06f8f01..8964e461cdd2 100644 --- a/sys/modules/zfs/Makefile +++ b/sys/modules/zfs/Makefile @@ -38,7 +38,7 @@ CFLAGS+= -I${.CURDIR} CFLAGS+= -D__KERNEL__ -DFREEBSD_NAMECACHE -DBUILDING_ZFS \ -DHAVE_UIO_ZEROCOPY -DWITHOUT_NETDUMP -D__KERNEL -D_SYS_CONDVAR_H_ \ - -D_SYS_VMEM_H_ -DIN_FREEBSD_BASE + -D_SYS_VMEM_H_ .if ${MACHINE_ARCH} == "amd64" CFLAGS+= -D__x86_64 -DHAVE_SSE2 -DHAVE_SSSE3 -DHAVE_SSE4_1 -DHAVE_SSE4_2 \