* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2015-09-18 12:50 Richard Yao
0 siblings, 0 replies; 15+ messages in thread
From: Richard Yao @ 2015-09-18 12:50 UTC (permalink / raw
To: gentoo-commits
commit: 5b9bf722d0344854d45636b94f9efca672d846f8
Author: Richard Yao <ryao <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 18 12:46:58 2015 +0000
Commit: Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Fri Sep 18 12:50:21 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5b9bf722
sys-fs/zfs-kmod-0.6.5-r1: Fix discard corruption regression
This is the first data corruption bug in the history of the ZoL project
and I regret to say that it is my fault. I wrote the patch that caused
it and it went into HEAD after passing upstream review. It affects Linux
2.6.36 and later.
Package-Manager: portage-2.2.20.1
Signed-off-by: Richard Yao <ryao <AT> gentoo.org>
.../files/zfs-kmod-0.6.5-discard-on-zvol-fix.patch | 31 +++++
sys-fs/zfs-kmod/zfs-kmod-0.6.5-r1.ebuild | 154 +++++++++++++++++++++
2 files changed, 185 insertions(+)
diff --git a/sys-fs/zfs-kmod/files/zfs-kmod-0.6.5-discard-on-zvol-fix.patch b/sys-fs/zfs-kmod/files/zfs-kmod-0.6.5-discard-on-zvol-fix.patch
new file mode 100644
index 0000000..632d08d
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/zfs-kmod-0.6.5-discard-on-zvol-fix.patch
@@ -0,0 +1,31 @@
+From 96165264ad0afe7a5d440ef49f9712a188486266 Mon Sep 17 00:00:00 2001
+From: Richard Yao <ryao@gentoo.org>
+Date: Fri, 18 Sep 2015 08:32:52 -0400
+Subject: [PATCH] Discard on zvols should not exceed the length of a block
+
+37f9dac592bf5889c3efb305c48ac39b4c7dd140 replaced the end-start
+calculation with a cached value, but neglected to update it on discard
+operations. This can cause us to discard data not requested, causing
+data loss on zvols.
+
+Reported-by: Richard Connon <richard.connon@zynstra.com>
+Signed-off-by: Richard Yao <ryao@gentoo.org>
+---
+ module/zfs/zvol.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/module/zfs/zvol.c b/module/zfs/zvol.c
+index 492f8ff..c5a8071 100644
+--- a/module/zfs/zvol.c
++++ b/module/zfs/zvol.c
+@@ -661,6 +661,7 @@ zvol_discard(struct bio *bio)
+ if (!(bio->bi_rw & REQ_SECURE)) {
+ start = P2ROUNDUP(start, zv->zv_volblocksize);
+ end = P2ALIGN(end, zv->zv_volblocksize);
++ size = end - start;
+ }
+ #endif
+
+--
+2.4.6
+
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.6.5-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.6.5-r1.ebuild
new file mode 100644
index 0000000..0e3665f
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.6.5-r1.ebuild
@@ -0,0 +1,154 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+AT_M4DIR="config"
+AUTOTOOLS_AUTORECONF="1"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
+
+if [ ${PV} == "9999" ] ; then
+ inherit git-2
+ EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
+else
+ inherit eutils versionator
+ SRC_URI="https://github.com/zfsonlinux/zfs/archive/zfs-${PV}.tar.gz"
+ S="${WORKDIR}/zfs-zfs-${PV}"
+ KEYWORDS="~amd64 ~arm ~ppc ~ppc64"
+fi
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="http://zfsonlinux.org/"
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug +rootfs"
+RESTRICT="debug? ( strip ) test"
+
+DEPEND="
+ =sys-kernel/spl-${PV}*
+ dev-lang/perl
+ virtual/awk
+"
+
+RDEPEND="${DEPEND}
+ !sys-fs/zfs-fuse
+"
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK="!DEBUG_LOCK_ALLOC
+ BLK_DEV_LOOP
+ EFI_PARTITION
+ IOSCHED_NOOP
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ !PAX_USERCOPY_SLABS
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use debug && CONFIG_CHECK="${CONFIG_CHECK}
+ FRAME_POINTER
+ DEBUG_INFO
+ !DEBUG_INFO_REDUCED
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK}
+ BLK_DEV_INITRD
+ DEVTMPFS
+ "
+
+ kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 4 2 || die "Linux 4.2 is the latest supported version."; }
+
+ check_extra_config
+}
+
+src_prepare() {
+ if [ ${PV} != "9999" ]
+ then
+ # Fix zvol data loss regression
+ # https://github.com/zfsonlinux/zfs/pull/3798
+ epatch "${FILESDIR}/${P}-discard-on-zvol-fix.patch"
+ fi
+
+ # Remove GPLv2-licensed ZPIOS unless we are debugging
+ use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
+
+ # Set module revision number
+ [ ${PV} != "9999" ] && \
+ { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ set_arch_to_kernel
+ local myeconfargs=(${myeconfargs}
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-spl="${EROOT}usr/src/${SPL_PATH}"
+ --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
+ $(use_enable debug)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
+ dodoc AUTHORS COPYRIGHT DISCLAIMER README.markdown
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ # Remove old modules
+ if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
+ then
+ ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
+ ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
+ ewarn "Automatically removing old modules to avoid problems."
+ rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
+ rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
+ fi
+
+ if use x86 || use arm
+ then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ ewarn "This version of ZFSOnLinux includes support for new feature flags"
+ ewarn "that are incompatible with previous versions. GRUB2 support for"
+ ewarn "/boot with the new feature flags is not yet available."
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags."
+ ewarn "Any new pools will be created with the new feature flags by default"
+ ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
+ ewarn "create a newpool that is backward compatible wih GRUB2, use "
+ ewarn
+ ewarn "zpool create -d -o feature@async_destroy=enabled "
+ ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
+ ewarn " -o feature@spacemap_histogram=enabled"
+ ewarn " -o feature@enabled_txg=enabled "
+ ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
+ ewarn " ..."
+ ewarn
+ ewarn "GRUB2 support will be updated as soon as either the GRUB2"
+ ewarn "developers do a tag or the Gentoo developers find time to backport"
+ ewarn "support from GRUB2 HEAD."
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2019-01-09 6:31 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2019-01-09 6:31 UTC (permalink / raw
To: gentoo-commits
commit: 88f9fdae57b9424aabdf32ecca18718681983f33
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 8 20:00:53 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Jan 9 06:27:59 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=88f9fdae
sys-fs/zfs-kmod: 0.7.12 linux-4.20 compatible
backport of current_kernel_time64() fix from 0.7.13-tbr
Package-Manager: Portage-2.3.54, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../files/zfs-kmod-0.7.12-kernel-4.20-compat.patch | 31 +++++
sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild | 148 +++++++++++++++++++++
2 files changed, 179 insertions(+)
diff --git a/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch b/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch
new file mode 100644
index 00000000000..75ed3c57992
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch
@@ -0,0 +1,31 @@
+From 4f981f6ab614a908f912f7dc147b248f96b498a2 Mon Sep 17 00:00:00 2001
+From: satmandu <satadru@umich.edu>
+Date: Wed, 26 Dec 2018 12:36:28 -0500
+Subject: [PATCH] Additional fixes for current_kernel_time in 4.20 on 0.7.x
+
+While https://github.com/zfsonlinux/spl/commit/cd1b28e0cfa923db988611df28958f7b84b53530 fixed the 4.20 current_kernel_time issues in spl as per https://github.com/zfsonlinux/zfs/pull/8074 in .07.x, current_kernel_time is still being used inside zpios-ctl.h in 0.7.x.
+
+I believe this may fix this issue in 0.7.x to allow it to compile successfully for kernel 4.2.0.
+---
+ include/zpios-ctl.h | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/include/zpios-ctl.h b/include/zpios-ctl.h
+index f17f1153260..068c9eaf173 100644
+--- a/include/zpios-ctl.h
++++ b/include/zpios-ctl.h
+@@ -181,9 +181,12 @@ zpios_timespec_t
+ zpios_timespec_now(void)
+ {
+ zpios_timespec_t zts_now;
+- struct timespec ts_now;
++ #if defined(HAVE_INODE_TIMESPEC64_TIMES)
++ inode_timespec_t ts_now = current_kernel_time64();
++ #else
++ inode_timespec_t ts_now = current_kernel_time();
++ #endif
+
+- ts_now = current_kernel_time();
+ zts_now.ts_sec = ts_now.tv_sec;
+ zts_now.ts_nsec = ts_now.tv_nsec;
+
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild
new file mode 100644
index 00000000000..ad9bf31d87c
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild
@@ -0,0 +1,148 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+if [ ${PV} == "9999" ]; then
+ AUTOTOOLS_AUTORECONF="1"
+ EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
+ inherit git-r3
+else
+ SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
+ S="${WORKDIR}/zfs-${PV}"
+ KEYWORDS="~amd64"
+fi
+
+inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="https://zfsonlinux.org/"
+
+LICENSE="CDDL debug? ( GPL-2+ )"
+SLOT="0"
+IUSE="custom-cflags debug +rootfs"
+RESTRICT="debug? ( strip ) test"
+
+DEPEND="
+ =sys-kernel/spl-${PV}*
+ dev-lang/perl
+ virtual/awk
+"
+
+RDEPEND="${DEPEND}
+ !sys-fs/zfs-fuse
+"
+
+AT_M4DIR="config"
+AUTOTOOLS_IN_SOURCE_BUILD="1"
+
+DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
+
+PATCHES=( "${FILESDIR}/${P}-kernel-4.20-compat.patch" )
+
+pkg_setup() {
+ linux-info_pkg_setup
+ CONFIG_CHECK="
+ !DEBUG_LOCK_ALLOC
+ EFI_PARTITION
+ IOSCHED_NOOP
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ !TRIM_UNUSED_KSYMS
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use debug && CONFIG_CHECK="${CONFIG_CHECK}
+ FRAME_POINTER
+ DEBUG_INFO
+ !DEBUG_INFO_REDUCED
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK}
+ BLK_DEV_INITRD
+ DEVTMPFS
+ "
+
+ kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
+
+ [ ${PV} != "9999" ] && \
+ { kernel_is le 4 20 || die "Linux 4.20 is the latest supported version."; }
+
+ check_extra_config
+}
+
+src_prepare() {
+ # Remove GPLv2-licensed ZPIOS unless we are debugging
+ use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
+
+ # Set module revision number
+ [ ${PV} != "9999" ] && \
+ { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
+
+ autotools-utils_src_prepare
+}
+
+src_configure() {
+ local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
+ use custom-cflags || strip-flags
+ filter-ldflags -Wl,*
+
+ set_arch_to_kernel
+ local myeconfargs=(${myeconfargs}
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ --with-spl="${EROOT}usr/src/${SPL_PATH}"
+ --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
+ $(use_enable debug)
+ )
+
+ autotools-utils_src_configure
+}
+
+src_install() {
+ autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ # Remove old modules
+ if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
+ then
+ ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
+ ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
+ ewarn "Automatically removing old modules to avoid problems."
+ rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
+ rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
+ fi
+
+ if use x86 || use arm
+ then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ ewarn "This version of ZFSOnLinux includes support for new feature flags"
+ ewarn "that are incompatible with previous versions. GRUB2 support for"
+ ewarn "/boot with the new feature flags is not yet available."
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags."
+ ewarn "Any new pools will be created with the new feature flags by default"
+ ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
+ ewarn "create a newpool that is backward compatible wih GRUB2, use "
+ ewarn
+ ewarn "zpool create -d -o feature@async_destroy=enabled "
+ ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
+ ewarn " -o feature@spacemap_histogram=enabled"
+ ewarn " -o feature@enabled_txg=enabled "
+ ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
+ ewarn " ..."
+ ewarn
+ ewarn "GRUB2 support will be updated as soon as either the GRUB2"
+ ewarn "developers do a tag or the Gentoo developers find time to backport"
+ ewarn "support from GRUB2 HEAD."
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2019-04-26 21:09 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2019-04-26 21:09 UTC (permalink / raw
To: gentoo-commits
commit: ac86e2dd8e23d43b6814954cc262840171b3e192
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 26 20:27:11 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Apr 26 21:09:40 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ac86e2dd
sys-fs/zfs-kmod: drop old
Package-Manager: Portage-2.3.65, Repoman-2.3.12
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/Manifest | 4 -
.../files/zfs-kmod-0.7.12-kernel-4.20-compat.patch | 31 -----
sys-fs/zfs-kmod/zfs-kmod-0.7.11.ebuild | 146 -------------------
sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild | 148 --------------------
sys-fs/zfs-kmod/zfs-kmod-0.7.8.ebuild | 146 -------------------
sys-fs/zfs-kmod/zfs-kmod-0.7.9-r1.ebuild | 155 ---------------------
sys-fs/zfs-kmod/zfs-kmod-0.7.9.ebuild | 146 -------------------
7 files changed, 776 deletions(-)
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 27a9625015d..7d8b4df3603 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,8 +1,4 @@
DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3e4812c05839d49d0cd877b756185c91b2609986f91939fbfda322809ddefc8ff9207fe076db03e0038e585ea2 SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451
-DIST zfs-0.7.11.tar.gz 6561125 BLAKE2B ee579aa01272d5565fe78ae6074dc1acdd34c8e9a26838462aea937132c322b0fb915c4dadec230560d586db2b2af129735ed6b5e41def4183c9c7ed456ca7aa SHA512 b53c92de2c2542a1b0189368e4b298e93bea13aec8ba415559e86bfc01a9c7deaf436e694aa047ef8a302c79224f96edd150ea93a57eb88c9e26d054cf7ccd2b
DIST zfs-0.7.12.tar.gz 6565017 BLAKE2B 493df30ecce1f169e02d6c8262ba71cc9e7b01d5b17ce188004f522f0c93943b858434067cba8173ccb3e08cde24a1d3e8a3996b2e852f8bc35251f8c4ab3809 SHA512 278e411eac5fb2a91108671b64521c2bd5c08024d5829e1679d8f243dfc3c6317363ed9c79dabfddecf425acb6b3003eeaf4e7d991513cbcae4d2644f5d30bf2
DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f SHA512 457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e
-DIST zfs-0.7.8.tar.gz 6514969 BLAKE2B 689d96ad7afeb422cbeca724f248ac56b6fcdc0a7ef215f735180406a7fc0d4d3c9700a41e855186d8044b304c9f0c142c2bdca387299c499974e424965970a4 SHA512 cdeabe10acd2feeeff8a6362987c757b716bfea6ebad42ce022a081106661f774150c113bdaa9e1ac441efdd6da4cf11e6119323ad60ae15ab445a872d952e35
-DIST zfs-0.7.9-r1-patches.tar.xz 10920 BLAKE2B 50a0b8533061b5eecc103179e6fd51499d87f1c3b331b0629efa29a5a7d405c03448db2245fed9389d149cc83021a2c263bc2f02133a5fdd11b088516c353fff SHA512 a9e8c04bf7449b0a63420202b2f6dd8a6aea96ac57e5925c2ca0223f662210f42316ada25aa6113103909de8c9976945828cdb91a6ff9932f282c01316d7b3ec
-DIST zfs-0.7.9.tar.gz 6548649 BLAKE2B aa2f1b9d0ba0eda1af7d420c43d65d5d4183169cfe97c693356e1e0b15967ea512c25454f2d77285600f2209d778e4299f420754932e403a390b87b4f488dc94 SHA512 af5d9c320885ee84019fb04250c4b12c7ac3bb3d1037b1961ec4584701a737558374dc22521743e197356efb1d1f0ced9beff675ae9cfcccf3cd8407467f18fa
DIST zfs-0.8.0-rc4.tar.gz 8874029 BLAKE2B 17dd408bfe5133339548c124529b22312c70f527cca9329a7198c415ee2010e03a967d06d6b56ba25c667c8586476daed97c812ffc26331827aac818eda27282 SHA512 0a1137cf5ed2859dd3876867c4f63b74f117847276a3d9de67736a92cbe5a0c9b2e599bb0e84664f5feb89be36188baacdcc2aa233b498fcfeb6fd946c8b73ea
diff --git a/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch b/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch
deleted file mode 100644
index 75ed3c57992..00000000000
--- a/sys-fs/zfs-kmod/files/zfs-kmod-0.7.12-kernel-4.20-compat.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4f981f6ab614a908f912f7dc147b248f96b498a2 Mon Sep 17 00:00:00 2001
-From: satmandu <satadru@umich.edu>
-Date: Wed, 26 Dec 2018 12:36:28 -0500
-Subject: [PATCH] Additional fixes for current_kernel_time in 4.20 on 0.7.x
-
-While https://github.com/zfsonlinux/spl/commit/cd1b28e0cfa923db988611df28958f7b84b53530 fixed the 4.20 current_kernel_time issues in spl as per https://github.com/zfsonlinux/zfs/pull/8074 in .07.x, current_kernel_time is still being used inside zpios-ctl.h in 0.7.x.
-
-I believe this may fix this issue in 0.7.x to allow it to compile successfully for kernel 4.2.0.
----
- include/zpios-ctl.h | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/include/zpios-ctl.h b/include/zpios-ctl.h
-index f17f1153260..068c9eaf173 100644
---- a/include/zpios-ctl.h
-+++ b/include/zpios-ctl.h
-@@ -181,9 +181,12 @@ zpios_timespec_t
- zpios_timespec_now(void)
- {
- zpios_timespec_t zts_now;
-- struct timespec ts_now;
-+ #if defined(HAVE_INODE_TIMESPEC64_TIMES)
-+ inode_timespec_t ts_now = current_kernel_time64();
-+ #else
-+ inode_timespec_t ts_now = current_kernel_time();
-+ #endif
-
-- ts_now = current_kernel_time();
- zts_now.ts_sec = ts_now.tv_sec;
- zts_now.ts_nsec = ts_now.tv_nsec;
-
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.11.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.11.ebuild
deleted file mode 100644
index d326057ceda..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.7.11.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS="~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 18 || die "Linux 4.18 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild
deleted file mode 100644
index ad9bf31d87c..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.7.12-r1.ebuild
+++ /dev/null
@@ -1,148 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS="~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-PATCHES=( "${FILESDIR}/${P}-kernel-4.20-compat.patch" )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 20 || die "Linux 4.20 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.8.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.8.ebuild
deleted file mode 100644
index aa482377473..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.7.8.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS="amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 16 || die "Linux 4.16 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.9-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.9-r1.ebuild
deleted file mode 100644
index c702d6ed35b..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.7.9-r1.ebuild
+++ /dev/null
@@ -1,155 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-AUTOTOOLS_AUTORECONF="1"
-if [ ${PV} == "9999" ]; then
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz
- https://dev.gentoo.org/~ryao/dist/zfs-${PVR}-patches.tar.xz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS="~amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PVR}
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 18 || die "Linux 4.18 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- if [ ${PV} != "9999" ]
- then
- # Apply patch set
- EPATCH_SUFFIX="patch" \
- EPATCH_FORCE="yes" \
- epatch "${WORKDIR}/zfs-${PVR}-patches"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.7.9.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.7.9.ebuild
deleted file mode 100644
index c0e759e6be3..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.7.9.ebuild
+++ /dev/null
@@ -1,146 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="5"
-
-if [ ${PV} == "9999" ]; then
- AUTOTOOLS_AUTORECONF="1"
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
- inherit git-r3
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- S="${WORKDIR}/zfs-${PV}"
- KEYWORDS="amd64"
-fi
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs autotools-utils
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://zfsonlinux.org/"
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="debug? ( strip ) test"
-
-DEPEND="
- =sys-kernel/spl-${PV}*
- dev-lang/perl
- virtual/awk
-"
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
-"
-
-AT_M4DIR="config"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-DOCS=( AUTHORS COPYRIGHT DISCLAIMER README.markdown )
-
-pkg_setup() {
- linux-info_pkg_setup
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- IOSCHED_NOOP
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- [ ${PV} != "9999" ] && \
- { kernel_is le 4 17 || die "Linux 4.17 is the latest supported version."; }
-
- check_extra_config
-}
-
-src_prepare() {
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i "${S}/module/Makefile.in"
-
- # Set module revision number
- [ ${PV} != "9999" ] && \
- { sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" "${S}/META" || die "Could not set Gentoo release"; }
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- local SPL_PATH="$(basename $(echo "${EROOT}usr/src/spl-"*))"
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- set_arch_to_kernel
- local myeconfargs=(${myeconfargs}
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-spl="${EROOT}usr/src/${SPL_PATH}"
- --with-spl-obj="${EROOT}usr/src/${SPL_PATH}/${KV_FULL}"
- $(use_enable debug)
- )
-
- autotools-utils_src_configure
-}
-
-src_install() {
- autotools-utils_src_install INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [ -d "${EROOT}lib/modules/${KV_FULL}/addon/zfs" ]
- then
- ewarn "${PN} now installs modules in ${EROOT}lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm
- then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2019-06-23 8:00 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2019-06-23 8:00 UTC (permalink / raw
To: gentoo-commits
commit: 92dbeb4238c0ff14f2ebb8fde4038ccb92bf0a44
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Sun Jun 23 07:57:44 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Sun Jun 23 08:00:28 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=92dbeb42
sys-fs/zfs-kmod: drop 0.8.0-r1
Package-Manager: Portage-2.3.67, Repoman-2.3.15
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/Manifest | 1 -
....0_Fix_integer_overflow_in_get_next_chunk.patch | 32 ----
.../zfs-kmod/files/0.8.0_revert_Report_holes.patch | 53 ------
sys-fs/zfs-kmod/zfs-kmod-0.8.0-r1.ebuild | 178 ---------------------
4 files changed, 264 deletions(-)
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 90cf193e838..29e419297f2 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,4 +1,3 @@
DIST zfs-0.6.5.11.tar.gz 2521959 BLAKE2B 95b145a26620995343df1a468367b882bc71ab3e4812c05839d49d0cd877b756185c91b2609986f91939fbfda322809ddefc8ff9207fe076db03e0038e585ea2 SHA512 877052da2a0cdc78b10cb5041da55e31242db2618c502997f4df9aa46a14482c7f33adce8d21aaf16164a9fe52edc358922ea89c8e109c3247e107bf607d6451
DIST zfs-0.7.13.tar.gz 6614047 BLAKE2B c59c46287715779eb04d69333b0a417fa9865eb0d61c642b043188c4c97d4eed369f76a48327326ed1d4dd608ff95d91d20d26c80ed0b120a8fcd5f83cea638f SHA512 457d8f110b68c9656194cd3738b216d5d807d680e5cfc6ed1f3cf5ebde67860476387c6b862ba3ba7f972d8945075963e6c325543ab84468e3eff5dbce68476e
-DIST zfs-0.8.0.tar.gz 9084737 BLAKE2B c3095ca07b7c36fa204274be1166fd244894de70b97a11da32606b08e9bb150bc1326ac8424d5c001eb33d2d94e214d3944ddfce885844885c55291a82f11a2f SHA512 ba29f1644ec6807f4cad574e4950e56026316c3d405c9fc40a63ab34c2400d508521b09f656ac97898e5feaca5e0b259d9d4d85f75a4b1782a9db13d3b14cdc6
DIST zfs-0.8.1.tar.gz 8668360 BLAKE2B f18268656381c20af6bd18421636a1c56633c7eafaf91b1308d15508d5f4bdcfa5dfbb4e09d0302ac3de9d6a4f69718fe9c3d083ed5b3ab2a32c6fb7a1db624b SHA512 1fb3957f65dbe94edaffcedb5b2694390dc14e472c11f7e63184a9ea6a774e79a43d47a2d789b7ced233fc67c76583bf7d5c1bda0692bb07929673e2a57f4667
diff --git a/sys-fs/zfs-kmod/files/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch b/sys-fs/zfs-kmod/files/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch
deleted file mode 100644
index 0042bfdc99c..00000000000
--- a/sys-fs/zfs-kmod/files/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ec4afd27f198d93a7bd32a05cb288708ba754ada Mon Sep 17 00:00:00 2001
-From: madz <olivier.mazouffre@ims-bordeaux.fr>
-Date: Wed, 29 May 2019 19:17:25 +0200
-Subject: [PATCH] Fix integer overflow in get_next_chunk()
-
-dn->dn_datablksz type is uint32_t and need to be casted to uint64_t
-to avoid an overflow when the record size is greater than 4 MiB.
-
-Reviewed-by: Tom Caputi <tcaputi@datto.com>
-Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Signed-off-by: Olivier Mazouffre <olivier.mazouffre@ims-bordeaux.fr>
-Closes #8778
-Closes #8797
----
- module/zfs/dmu.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
-index 1697a632078..a283b062238 100644
---- a/module/zfs/dmu.c
-+++ b/module/zfs/dmu.c
-@@ -719,8 +719,8 @@ get_next_chunk(dnode_t *dn, uint64_t *start, uint64_t minimum, uint64_t *l1blks)
- uint64_t blks;
- uint64_t maxblks = DMU_MAX_ACCESS >> (dn->dn_indblkshift + 1);
- /* bytes of data covered by a level-1 indirect block */
-- uint64_t iblkrange =
-- dn->dn_datablksz * EPB(dn->dn_indblkshift, SPA_BLKPTRSHIFT);
-+ uint64_t iblkrange = (uint64_t)dn->dn_datablksz *
-+ EPB(dn->dn_indblkshift, SPA_BLKPTRSHIFT);
-
- ASSERT3U(minimum, <=, *start);
-
diff --git a/sys-fs/zfs-kmod/files/0.8.0_revert_Report_holes.patch b/sys-fs/zfs-kmod/files/0.8.0_revert_Report_holes.patch
deleted file mode 100644
index f8d67ccc7ce..00000000000
--- a/sys-fs/zfs-kmod/files/0.8.0_revert_Report_holes.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Wed, 29 May 2019 14:38:15 -0700
-Subject: Revert [PATCH] Report holes when there are only metadata changes
-
-This reverts ec4f9b8f30391a3fb46c8d4a31c2dc9250dca1bb
-Issue: https://github.com/zfsonlinux/zfs/issues/8816
-Bug: https://bugs.gentoo.org/635002
----
---- b/module/zfs/dmu.c
-+++ a/module/zfs/dmu.c
-@@ -2366,39 +2366,14 @@
- return (err);
-
- /*
-+ * Check if dnode is dirty
-- * Check if there are dirty data blocks or frees which have not been
-- * synced. Dirty spill and bonus blocks which are external to the
-- * object can ignored when reporting holes.
- */
-- mutex_enter(&dn->dn_mtx);
- for (i = 0; i < TXG_SIZE; i++) {
- if (multilist_link_active(&dn->dn_dirty_link[i])) {
-+ clean = B_FALSE;
-+ break;
--
-- if (dn->dn_free_ranges[i] != NULL) {
-- clean = B_FALSE;
-- break;
-- }
--
-- list_t *list = &dn->dn_dirty_records[i];
-- dbuf_dirty_record_t *dr;
--
-- for (dr = list_head(list); dr != NULL;
-- dr = list_next(list, dr)) {
-- dmu_buf_impl_t *db = dr->dr_dbuf;
--
-- if (db->db_blkid == DMU_SPILL_BLKID ||
-- db->db_blkid == DMU_BONUS_BLKID)
-- continue;
--
-- clean = B_FALSE;
-- break;
-- }
- }
--
-- if (clean == B_FALSE)
-- break;
- }
-- mutex_exit(&dn->dn_mtx);
-
- /*
- * If compatibility option is on, sync any current changes before
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.0-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.0-r1.ebuild
deleted file mode 100644
index 0108a7a9b3b..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.8.0-r1.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2019 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit flag-o-matic linux-info linux-mod toolchain-funcs
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://zfsonlinux.org/"
-
-if [[ ${PV} == "9999" ]]; then
- inherit autotools git-r3
- EGIT_REPO_URI="https://github.com/zfsonlinux/zfs.git"
-else
- SRC_URI="https://github.com/zfsonlinux/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- KEYWORDS="~amd64"
- S="${WORKDIR}/zfs-${PV}"
- ZFS_KERNEL_COMPAT="5.1"
-fi
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-
-DEPEND=""
-
-RDEPEND="${DEPEND}
- !sys-fs/zfs-fuse
- !sys-kernel/spl
-"
-
-BDEPEND="
- dev-lang/perl
- virtual/awk
-"
-
-RESTRICT="debug? ( strip ) test"
-
-DOCS=( AUTHORS COPYRIGHT META README.md )
-
-PATCHES=(
- "${FILESDIR}"/0.8.0_revert_Report_holes.patch
- "${FILESDIR}"/0.8.0_Fix_integer_overflow_in_get_next_chunk.patch
-)
-
-pkg_setup() {
- linux-info_pkg_setup
-
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
-
- kernel_is -ge 2 6 32 || die "Linux 2.6.32 or newer required"
-
- if [[ ${PV} != "9999" ]]; then
- local kv_major_max kv_minor_max zcompat
- zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- kv_major_max="${zcompat%%.*}"
- zcompat="${zcompat#*.}"
- kv_minor_max="${zcompat%%.*}"
- kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
- "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
- fi
-
- check_extra_config
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == "9999" ]]; then
- eautoreconf
- else
- # Set module revision number
- sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
- fi
-
- # Remove GPLv2-licensed ZPIOS unless we are debugging
- use debug || sed -e 's/^subdir-m += zpios$//' -i module/Makefile.in
-}
-
-src_configure() {
- set_arch_to_kernel
-
- use custom-cflags || strip-flags
-
- filter-ldflags -Wl,*
-
- local myconf=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- set_arch_to_kernel
-
- myemakeargs=( V=1 )
-
- emake "${myemakeargs[@]}"
-}
-
-src_install() {
- set_arch_to_kernel
-
- myemakeargs+=(
- DEPMOD="/bin/true"
- DESTDIR="${D}"
- INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- )
-
- emake "${myemakeargs[@]}" install
-
- einstalldocs
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then
- ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm; then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of ZFSOnLinux includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2019-12-13 23:43 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2019-12-13 23:43 UTC (permalink / raw
To: gentoo-commits
commit: 2b66902c411859f19d0ee76b38efcd162d6b3f8f
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Dec 13 23:41:16 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Dec 13 23:42:23 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b66902c
sys-fs/zfs-kmod: revbump 0.8.2, fix O_TMPFILE umask ignore
Bug: https://bugs.gentoo.org/686142
Package-Manager: Portage-2.3.79, Repoman-2.3.17
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/files/0.8.2-umask_O_TMPFILE.patch | 34 ++++++++++++++++++++++
...od-0.8.2-r1.ebuild => zfs-kmod-0.8.2-r2.ebuild} | 2 ++
2 files changed, 36 insertions(+)
diff --git a/sys-fs/zfs-kmod/files/0.8.2-umask_O_TMPFILE.patch b/sys-fs/zfs-kmod/files/0.8.2-umask_O_TMPFILE.patch
new file mode 100644
index 00000000000..9252b6e7815
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/0.8.2-umask_O_TMPFILE.patch
@@ -0,0 +1,34 @@
+From ddb4e69db5eb0ed741dc4e32714af3e0f054086c Mon Sep 17 00:00:00 2001
+From: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
+Date: Sat, 14 Dec 2019 08:02:23 +0900
+Subject: [PATCH] Don't fail to apply umask for O_TMPFILE files
+
+Apply umask to `mode` which will eventually be applied to inode.
+This is needed since VFS doesn't apply umask for O_TMPFILE files.
+
+(Note that zpl_init_acl() applies `ip->i_mode &= ~current_umask();`
+only when POSIX ACL is used.)
+
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Reviewed-by: Tony Hutter <hutter2@llnl.gov>
+Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@gmail.com>
+Closes #8997
+Closes #8998
+
+diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
+index 264c5d2b1cf..e1c6ce7b705 100644
+--- a/module/zfs/zpl_inode.c
++++ b/module/zfs/zpl_inode.c
+@@ -218,6 +218,12 @@ zpl_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
+
+ crhold(cr);
+ vap = kmem_zalloc(sizeof (vattr_t), KM_SLEEP);
++ /*
++ * The VFS does not apply the umask, therefore it is applied here
++ * when POSIX ACLs are not enabled.
++ */
++ if (!IS_POSIXACL(dir))
++ mode &= ~current_umask();
+ zpl_vap_init(vap, dir, mode, cr);
+
+ cookie = spl_fstrans_mark();
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.2-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.2-r2.ebuild
similarity index 98%
rename from sys-fs/zfs-kmod/zfs-kmod-0.8.2-r1.ebuild
rename to sys-fs/zfs-kmod/zfs-kmod-0.8.2-r2.ebuild
index 0df21c6da8c..961ee269f06 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-0.8.2-r1.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-0.8.2-r2.ebuild
@@ -38,6 +38,8 @@ RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
+PATCHES=( "${FILESDIR}/${PV}-umask_O_TMPFILE.patch" )
+
pkg_setup() {
linux-info_pkg_setup
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2020-08-26 23:35 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2020-08-26 23:35 UTC (permalink / raw
To: gentoo-commits
commit: 976dd88af1c35afbd35d0285aef61f7fc8376f6d
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 26 23:12:24 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Aug 26 23:34:44 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=976dd88a
sys-fs/zfs-kmod: apply znver build failure workaround
Bug: https://bugs.gentoo.org/738270
Package-Manager: Portage-3.0.4, Repoman-3.0.1
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/files/2.0.0_rc1-U__BMI__.patch | 29 ++++++++++++++++++++++++++
sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild | 2 ++
2 files changed, 31 insertions(+)
diff --git a/sys-fs/zfs-kmod/files/2.0.0_rc1-U__BMI__.patch b/sys-fs/zfs-kmod/files/2.0.0_rc1-U__BMI__.patch
new file mode 100644
index 00000000000..9e9a007c300
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/2.0.0_rc1-U__BMI__.patch
@@ -0,0 +1,29 @@
+From 81a3970fca5759499effc3131e59c9bd8f446cc9 Mon Sep 17 00:00:00 2001
+From: Georgy Yakovlev <gyakovlev@gentoo.org>
+Date: Wed, 26 Aug 2020 16:02:48 -0700
+Subject: [PATCH] module/zstd: pass -U__BMI__
+
+Closes: https://github.com/openzfs/zfs/issues/10758
+Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
+---
+ module/zstd/Makefile.in | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/module/zstd/Makefile.in b/module/zstd/Makefile.in
+index eea749ea8..bfceca920 100644
+--- a/module/zstd/Makefile.in
++++ b/module/zstd/Makefile.in
+@@ -20,6 +20,10 @@ ccflags-y += -O3
+ # Set it for other compilers, too.
+ $(obj)/lib/zstd.o: c_flags += -fno-tree-vectorize
+
++# SSE register return with SSE disabled if -march=znverX is passed
++# https://github.com/openzfs/zfs/issues/10758
++$(obj)/lib/zstd.o: c_flags += -U__BMI__
++
+ # Quiet warnings about frame size due to unused code in unmodified zstd lib
+ $(obj)/lib/zstd.o: c_flags += -Wframe-larger-than=20480
+
+--
+2.28.0
+
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild
index e475ec25736..6acf1aa1679 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.0.0_rc1.ebuild
@@ -38,6 +38,8 @@ RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
+PATCHES=( "${FILESDIR}/${PV}-U__BMI__.patch" )
+
pkg_setup() {
CONFIG_CHECK="
!DEBUG_LOCK_ALLOC
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2020-11-03 20:07 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2020-11-03 20:07 UTC (permalink / raw
To: gentoo-commits
commit: a19427b9ebd749036ac73d9165b53d9044027c1d
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 3 19:25:01 2020 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Nov 3 20:04:11 2020 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a19427b9
sys-fs/zfs-kmod: drop 0.8.4
Package-Manager: Portage-3.0.9, Repoman-3.0.2
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/Manifest | 1 -
sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch | 48 ------
sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild | 183 ---------------------
3 files changed, 232 deletions(-)
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 128c485727a..103e10fa8d8 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,3 +1,2 @@
-DIST zfs-0.8.4.tar.gz 9285838 BLAKE2B 776bcd6dfab8825c07d315085e288b29bf543d6957325d5d566b7b78c04505dde9bd25eb6684cb4a1b6a657de8a4e1290d04d2b9079d26d6b834a70f1ec3b569 SHA512 9086dc6a6262dd93ca6ec43f1b4c2e5c804deba708c8a7460b8531aa4802b0bf8cac0917a1a00e6af2e96d4a21cd68b85e226bf571bd94041d0325c457106eb1
DIST zfs-0.8.5.tar.gz 9196381 BLAKE2B 8376f360369c4657ff1fc040fb2bba780bbd5d6a98d149d2fa4ba39478588e213dbf6db218c7bd970839f015a69ae00ac951b90afc1c26b34aadf666b2976cab SHA512 3e6e70b76f7cc5b018adb78ce7c3009f88faf5b3da0a03170b03577cd84a2937b6056621c41fc819fd08bf59b28053caf8fec375cf375816a6786bb5646ed773
DIST zfs-2.0.0-rc4.tar.gz 12861762 BLAKE2B 638eb426955de38efbbb390cb02642298dd73caa5d9c9e28d8aea89bb40967c251bbbe66fbd38e08c922fb1c6fa935c959572abf237ea57ee7d9a5982693e275 SHA512 3972b92c7c0e92416fcde1fa01e7d1c20046de2e21d83a6694d0dc8753f13009b38f0f656202364da85b798886feffd06292b5fd5d23b0b3afc4f81fd86a540b
diff --git a/sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch b/sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch
deleted file mode 100644
index 1a2948a3158..00000000000
--- a/sys-fs/zfs-kmod/files/0.8.4-powerpc_jmp_weak.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From bd0efd1f062bfba5dd2d6b1fe30b6949f8e0a8ef Mon Sep 17 00:00:00 2001
-From: sterlingjensen <5555776+sterlingjensen@users.noreply.github.com>
-Date: Mon, 24 Aug 2020 22:41:05 -0500
-Subject: [PATCH] Mark lua setjmp/longjmp for powerpc weak
-
-Linux already defines setjmp/longjmp for powerpc, which leads to
-duplicate symbols in a statically linked build.
-
-Signed-off-by: Sterlng Jensen <sterlingjensen@users.noreply.github.com>
----
- module/lua/setjmp/setjmp_ppc.S | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/module/lua/setjmp/setjmp_ppc.S b/module/lua/setjmp/setjmp_ppc.S
-index f787ef34913..72aa5d5ab5b 100644
---- a/module/lua/setjmp/setjmp_ppc.S
-+++ b/module/lua/setjmp/setjmp_ppc.S
-@@ -56,7 +56,7 @@
- #define ENTRY(name) \
- .align 2 ; \
- .type name,@function; \
-- .globl name; \
-+ .weak name; \
- name:
-
- #else /* PPC64_ELF_ABI_v1 */
-@@ -65,8 +65,8 @@ name:
- #define GLUE(a,b) XGLUE(a,b)
- #define ENTRY(name) \
- .align 2 ; \
-- .globl name; \
-- .globl GLUE(.,name); \
-+ .weak name; \
-+ .weak GLUE(.,name); \
- .pushsection ".opd","aw"; \
- name: \
- .quad GLUE(.,name); \
-@@ -83,8 +83,8 @@ GLUE(.,name):
- #define ENTRY(name) \
- .text; \
- .p2align 4; \
-- .globl name; \
-- .type name,@function; \
-+ .weak name; \
-+ .type name,@function; \
- name:
-
- #endif /* __powerpc64__ */
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild
deleted file mode 100644
index 18afe59c4a9..00000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.8.4-r1.ebuild
+++ /dev/null
@@ -1,183 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools flag-o-matic linux-mod toolchain-funcs
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://github.com/openzfs/zfs"
-
-if [[ ${PV} == "9999" ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
-else
- SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- KEYWORDS="amd64 arm64 ppc64"
- S="${WORKDIR}/zfs-${PV}"
- ZFS_KERNEL_COMPAT="5.6"
-fi
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0"
-IUSE="custom-cflags debug +rootfs"
-
-DEPEND=""
-
-RDEPEND="${DEPEND}
- !sys-kernel/spl
-"
-
-BDEPEND="
- dev-lang/perl
- virtual/awk
-"
-
-RESTRICT="debug? ( strip ) test"
-
-DOCS=( AUTHORS COPYRIGHT META README.md )
-
-PATCHES=( "${FILESDIR}/${PV}-powerpc_jmp_weak.patch" )
-
-pkg_setup() {
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- if use arm64; then
- kernel_is -ge 5 && CONFIG_CHECK="${CONFIG_CHECK} !PREEMPT"
- fi
-
- kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
-
- if [[ ${PV} != "9999" ]]; then
- local kv_major_max kv_minor_max zcompat
- zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- kv_major_max="${zcompat%%.*}"
- zcompat="${zcompat#*.}"
- kv_minor_max="${zcompat%%.*}"
- kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
- "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
-
- # 0.8.x requires at least 2.6.32
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
- else
- # git master requires at least 3.10
- kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
- fi
-
- linux-mod_pkg_setup
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == "9999" ]]; then
- eautoreconf
- else
- # Set module revision number
- sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
- fi
-}
-
-src_configure() {
- set_arch_to_kernel
-
- use custom-cflags || strip-flags
-
- filter-ldflags -Wl,*
-
- local myconf=(
- CROSS_COMPILE="${CHOST}-"
- HOSTCC="$(tc-getBUILD_CC)"
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
-
- CONFIG_SHELL="${EPREFIX}/bin/bash" econf "${myconf[@]}"
-}
-
-src_compile() {
- set_arch_to_kernel
-
- myemakeargs=(
- CROSS_COMPILE="${CHOST}-"
- HOSTCC="$(tc-getBUILD_CC)"
- V=1
- )
-
- emake "${myemakeargs[@]}"
-}
-
-src_install() {
- set_arch_to_kernel
-
- myemakeargs+=(
- DEPMOD="/bin/true"
- DESTDIR="${D}"
- INSTALL_MOD_PATH="${INSTALL_MOD_PATH:-$EROOT}"
- )
-
- emake "${myemakeargs[@]}" install
-
- einstalldocs
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then
- ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon"
- fi
-
- if use x86 || use arm; then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of OpenZFS includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of ZFSOnLinux. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2021-11-08 6:09 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2021-11-08 6:09 UTC (permalink / raw
To: gentoo-commits
commit: 9fb275f656de639e25acc9497b70b4cae593d35d
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Mon Nov 8 06:07:13 2021 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Mon Nov 8 06:07:13 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9fb275f6
sys-fs/zfs-kmod: yank SEEK_HOLE patch for now
Preliminary investigation suggests this patch (and earlier iterations)
may introduce regressions. Let's yank it for now while we continue
the investigation with upstream.
Bug: https://bugs.gentoo.org/815469
See: https://github.com/openzfs/zfs/issues/11900
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-fs/zfs-kmod/files/2.1.1-fix-lseek-mmap.patch | 594 ---------------------
...od-2.1.1-r1.ebuild => zfs-kmod-2.1.1-r2.ebuild} | 2 -
2 files changed, 596 deletions(-)
diff --git a/sys-fs/zfs-kmod/files/2.1.1-fix-lseek-mmap.patch b/sys-fs/zfs-kmod/files/2.1.1-fix-lseek-mmap.patch
deleted file mode 100644
index 2c3a66a97bf..00000000000
--- a/sys-fs/zfs-kmod/files/2.1.1-fix-lseek-mmap.patch
+++ /dev/null
@@ -1,594 +0,0 @@
-From de198f2d9507b6dcf3d0d8f037ba33940208733e Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1@llnl.gov>
-Date: Sun, 7 Nov 2021 13:27:44 -0800
-Subject: [PATCH] Fix lseek(SEEK_DATA/SEEK_HOLE) mmap consistency
-
-When using lseek(2) to report data/holes memory mapped regions of
-the file were ignored. This could result in incorrect results.
-To handle this zfs_holey_common() was updated to asynchronously
-writeback any dirty mmap(2) regions prior to reporting holes.
-
-Additionally, while not strictly required, the dn_struct_rwlock is
-now held over the dirty check to prevent the dnode structure from
-changing. This ensures that a clean dnode can't be dirtied before
-the data/hole is located. The range lock is now also taken to
-ensure the call cannot race with zfs_write().
-
-Furthermore, the code was refactored to provide a dnode_is_dirty()
-helper function which checks the dnode for any dirty records to
-determine its dirtiness.
-
-Reviewed-by: Matthew Ahrens <mahrens@delphix.com>
-Reviewed-by: Tony Hutter <hutter2@llnl.gov>
-Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #11900
-Closes #12724
----
- configure.ac | 1 +
- include/os/freebsd/spl/sys/vnode.h | 18 +++
- include/os/freebsd/zfs/sys/zfs_znode_impl.h | 3 +-
- include/os/linux/zfs/sys/zfs_znode_impl.h | 1 +
- include/sys/dnode.h | 1 +
- man/man4/zfs.4 | 2 +-
- module/zfs/dmu.c | 53 ++++---
- module/zfs/dnode.c | 20 +++
- module/zfs/zfs_vnops.c | 9 +-
- tests/runfiles/common.run | 2 +-
- tests/zfs-tests/cmd/Makefile.am | 1 +
- tests/zfs-tests/cmd/mmap_seek/.gitignore | 1 +
- tests/zfs-tests/cmd/mmap_seek/Makefile.am | 6 +
- tests/zfs-tests/cmd/mmap_seek/mmap_seek.c | 147 ++++++++++++++++++
- tests/zfs-tests/include/commands.cfg | 1 +
- tests/zfs-tests/include/tunables.cfg | 1 +
- .../tests/functional/mmap/Makefile.am | 3 +-
- .../functional/mmap/mmap_seek_001_pos.ksh | 67 ++++++++
- 18 files changed, 305 insertions(+), 32 deletions(-)
- create mode 100644 tests/zfs-tests/cmd/mmap_seek/.gitignore
- create mode 100644 tests/zfs-tests/cmd/mmap_seek/Makefile.am
- create mode 100644 tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
- create mode 100755 tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh
-
-diff --git a/configure.ac b/configure.ac
-index 6f34b210d2b..ebc7b276a64 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -221,6 +221,7 @@ AC_CONFIG_FILES([
- tests/zfs-tests/cmd/mktree/Makefile
- tests/zfs-tests/cmd/mmap_exec/Makefile
- tests/zfs-tests/cmd/mmap_libaio/Makefile
-+ tests/zfs-tests/cmd/mmap_seek/Makefile
- tests/zfs-tests/cmd/mmapwrite/Makefile
- tests/zfs-tests/cmd/nvlist_to_lua/Makefile
- tests/zfs-tests/cmd/randfree_file/Makefile
-diff --git a/include/os/freebsd/spl/sys/vnode.h b/include/os/freebsd/spl/sys/vnode.h
-index 3670712a045..3bc8a18eeb7 100644
---- a/include/os/freebsd/spl/sys/vnode.h
-+++ b/include/os/freebsd/spl/sys/vnode.h
-@@ -59,6 +59,8 @@ enum symfollow { NO_FOLLOW = NOFOLLOW };
- #include <sys/file.h>
- #include <sys/filedesc.h>
- #include <sys/syscallsubr.h>
-+#include <sys/vm.h>
-+#include <vm/vm_object.h>
-
- typedef struct vop_vector vnodeops_t;
- #define VOP_FID VOP_VPTOFH
-@@ -83,6 +85,22 @@ vn_is_readonly(vnode_t *vp)
- #define vn_has_cached_data(vp) \
- ((vp)->v_object != NULL && \
- (vp)->v_object->resident_page_count > 0)
-+
-+static __inline void
-+vn_flush_cached_data(vnode_t *vp, boolean_t sync)
-+{
-+#if __FreeBSD_version > 1300054
-+ if (vm_object_mightbedirty(vp->v_object)) {
-+#else
-+ if (vp->v_object->flags & OBJ_MIGHTBEDIRTY) {
-+#endif
-+ int flags = sync ? OBJPC_SYNC : 0;
-+ zfs_vmobject_wlock(vp->v_object);
-+ vm_object_page_clean(vp->v_object, 0, 0, flags);
-+ zfs_vmobject_wunlock(vp->v_object);
-+ }
-+}
-+
- #define vn_exists(vp) do { } while (0)
- #define vn_invalid(vp) do { } while (0)
- #define vn_renamepath(tdvp, svp, tnm, lentnm) do { } while (0)
-diff --git a/include/os/freebsd/zfs/sys/zfs_znode_impl.h b/include/os/freebsd/zfs/sys/zfs_znode_impl.h
-index 7d28bddbf51..4456046e6e4 100644
---- a/include/os/freebsd/zfs/sys/zfs_znode_impl.h
-+++ b/include/os/freebsd/zfs/sys/zfs_znode_impl.h
-@@ -116,7 +116,8 @@ typedef struct zfs_soft_state {
- #define Z_ISLNK(type) ((type) == VLNK)
- #define Z_ISDIR(type) ((type) == VDIR)
-
--#define zn_has_cached_data(zp) vn_has_cached_data(ZTOV(zp))
-+#define zn_has_cached_data(zp) vn_has_cached_data(ZTOV(zp))
-+#define zn_flush_cached_data(zp, sync) vn_flush_cached_data(ZTOV(zp), sync)
- #define zn_rlimit_fsize(zp, uio) \
- vn_rlimit_fsize(ZTOV(zp), GET_UIO_STRUCT(uio), zfs_uio_td(uio))
-
-diff --git a/include/os/linux/zfs/sys/zfs_znode_impl.h b/include/os/linux/zfs/sys/zfs_znode_impl.h
-index 0a6273442b7..de46fc8f2bd 100644
---- a/include/os/linux/zfs/sys/zfs_znode_impl.h
-+++ b/include/os/linux/zfs/sys/zfs_znode_impl.h
-@@ -71,6 +71,7 @@ extern "C" {
- #define Z_ISDIR(type) S_ISDIR(type)
-
- #define zn_has_cached_data(zp) ((zp)->z_is_mapped)
-+#define zn_flush_cached_data(zp, sync) write_inode_now(ZTOI(zp), sync)
- #define zn_rlimit_fsize(zp, uio) (0)
-
- /*
-diff --git a/include/sys/dnode.h b/include/sys/dnode.h
-index e7cccd044ab..3f5fcc958c3 100644
---- a/include/sys/dnode.h
-+++ b/include/sys/dnode.h
-@@ -425,6 +425,7 @@ boolean_t dnode_add_ref(dnode_t *dn, void *ref);
- void dnode_rele(dnode_t *dn, void *ref);
- void dnode_rele_and_unlock(dnode_t *dn, void *tag, boolean_t evicting);
- int dnode_try_claim(objset_t *os, uint64_t object, int slots);
-+boolean_t dnode_is_dirty(dnode_t *dn);
- void dnode_setdirty(dnode_t *dn, dmu_tx_t *tx);
- void dnode_set_dirtyctx(dnode_t *dn, dmu_tx_t *tx, void *tag);
- void dnode_sync(dnode_t *dn, dmu_tx_t *tx);
-diff --git a/man/man4/zfs.4 b/man/man4/zfs.4
-index d7fc31bfde1..a136690c76e 100644
---- a/man/man4/zfs.4
-+++ b/man/man4/zfs.4
-@@ -1586,7 +1586,7 @@ Allow no-operation writes.
- The occurrence of nopwrites will further depend on other pool properties
- .Pq i.a. the checksumming and compression algorithms .
- .
--.It Sy zfs_dmu_offset_next_sync Ns = Ns Sy 0 Ns | ns 1 Pq int
-+.It Sy zfs_dmu_offset_next_sync Ns = Ns Sy 0 Ns | Ns 1 Pq int
- Enable forcing TXG sync to find holes.
- When enabled forces ZFS to act like prior versions when
- .Sy SEEK_HOLE No or Sy SEEK_DATA
-diff --git a/module/zfs/dmu.c b/module/zfs/dmu.c
-index b29d82fd793..f12c5eda8b5 100644
---- a/module/zfs/dmu.c
-+++ b/module/zfs/dmu.c
-@@ -2093,42 +2093,41 @@ int
- dmu_offset_next(objset_t *os, uint64_t object, boolean_t hole, uint64_t *off)
- {
- dnode_t *dn;
-- int i, err;
-- boolean_t clean = B_TRUE;
-+ int err;
-
-+restart:
- err = dnode_hold(os, object, FTAG, &dn);
- if (err)
- return (err);
-
-- /*
-- * Check if dnode is dirty
-- */
-- for (i = 0; i < TXG_SIZE; i++) {
-- if (multilist_link_active(&dn->dn_dirty_link[i])) {
-- clean = B_FALSE;
-- break;
-- }
-- }
-+ rw_enter(&dn->dn_struct_rwlock, RW_READER);
-
-- /*
-- * If compatibility option is on, sync any current changes before
-- * we go trundling through the block pointers.
-- */
-- if (!clean && zfs_dmu_offset_next_sync) {
-- clean = B_TRUE;
-- dnode_rele(dn, FTAG);
-- txg_wait_synced(dmu_objset_pool(os), 0);
-- err = dnode_hold(os, object, FTAG, &dn);
-- if (err)
-- return (err);
-- }
-+ if (dnode_is_dirty(dn)) {
-+ /*
-+ * If the zfs_dmu_offset_next_sync module option is enabled
-+ * then strict hole reporting has been requested. Dirty
-+ * dnodes must be synced to disk to accurately report all
-+ * holes. When disabled (the default) dirty dnodes are
-+ * reported to not have any holes which is always safe.
-+ *
-+ * When called by zfs_holey_common() the zp->z_rangelock
-+ * is held to prevent zfs_write() and mmap writeback from
-+ * re-dirtying the dnode after txg_wait_synced().
-+ */
-+ if (zfs_dmu_offset_next_sync) {
-+ rw_exit(&dn->dn_struct_rwlock);
-+ dnode_rele(dn, FTAG);
-+ txg_wait_synced(dmu_objset_pool(os), 0);
-+ goto restart;
-+ }
-
-- if (clean)
-- err = dnode_next_offset(dn,
-- (hole ? DNODE_FIND_HOLE : 0), off, 1, 1, 0);
-- else
- err = SET_ERROR(EBUSY);
-+ } else {
-+ err = dnode_next_offset(dn, DNODE_FIND_HAVELOCK |
-+ (hole ? DNODE_FIND_HOLE : 0), off, 1, 1, 0);
-+ }
-
-+ rw_exit(&dn->dn_struct_rwlock);
- dnode_rele(dn, FTAG);
-
- return (err);
-diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c
-index 900240479c7..6f87f49f89f 100644
---- a/module/zfs/dnode.c
-+++ b/module/zfs/dnode.c
-@@ -1648,6 +1648,26 @@ dnode_try_claim(objset_t *os, uint64_t object, int slots)
- slots, NULL, NULL));
- }
-
-+/*
-+ * Checks if the dnode contains any uncommitted dirty records.
-+ */
-+boolean_t
-+dnode_is_dirty(dnode_t *dn)
-+{
-+ mutex_enter(&dn->dn_mtx);
-+
-+ for (int i = 0; i < TXG_SIZE; i++) {
-+ if (list_head(&dn->dn_dirty_records[i]) != NULL) {
-+ mutex_exit(&dn->dn_mtx);
-+ return (B_TRUE);
-+ }
-+ }
-+
-+ mutex_exit(&dn->dn_mtx);
-+
-+ return (B_FALSE);
-+}
-+
- void
- dnode_setdirty(dnode_t *dn, dmu_tx_t *tx)
- {
-diff --git a/module/zfs/zfs_vnops.c b/module/zfs/zfs_vnops.c
-index a83f0b02ab5..7cbb70f499a 100644
---- a/module/zfs/zfs_vnops.c
-+++ b/module/zfs/zfs_vnops.c
-@@ -85,6 +85,7 @@ zfs_fsync(znode_t *zp, int syncflag, cred_t *cr)
- static int
- zfs_holey_common(znode_t *zp, ulong_t cmd, loff_t *off)
- {
-+ zfs_locked_range_t *lr;
- uint64_t noff = (uint64_t)*off; /* new offset */
- uint64_t file_sz;
- int error;
-@@ -100,12 +101,18 @@ zfs_holey_common(znode_t *zp, ulong_t cmd, loff_t *off)
- else
- hole = B_FALSE;
-
-+ /* Flush any mmap()'d data to disk */
-+ if (zn_has_cached_data(zp))
-+ zn_flush_cached_data(zp, B_FALSE);
-+
-+ lr = zfs_rangelock_enter(&zp->z_rangelock, 0, file_sz, RL_READER);
- error = dmu_offset_next(ZTOZSB(zp)->z_os, zp->z_id, hole, &noff);
-+ zfs_rangelock_exit(lr);
-
- if (error == ESRCH)
- return (SET_ERROR(ENXIO));
-
-- /* file was dirty, so fall back to using generic logic */
-+ /* File was dirty, so fall back to using generic logic */
- if (error == EBUSY) {
- if (hole)
- *off = file_sz;
-diff --git a/tests/runfiles/common.run b/tests/runfiles/common.run
-index 7f7d161be35..9f181b53e15 100644
---- a/tests/runfiles/common.run
-+++ b/tests/runfiles/common.run
-@@ -675,7 +675,7 @@ tests = ['migration_001_pos', 'migration_002_pos', 'migration_003_pos',
- tags = ['functional', 'migration']
-
- [tests/functional/mmap]
--tests = ['mmap_write_001_pos', 'mmap_read_001_pos']
-+tests = ['mmap_write_001_pos', 'mmap_read_001_pos', 'mmap_seek_001_pos']
- tags = ['functional', 'mmap']
-
- [tests/functional/mount]
-diff --git a/tests/zfs-tests/cmd/Makefile.am b/tests/zfs-tests/cmd/Makefile.am
-index 2b965ca7000..d1c29fcd1c6 100644
---- a/tests/zfs-tests/cmd/Makefile.am
-+++ b/tests/zfs-tests/cmd/Makefile.am
-@@ -19,6 +19,7 @@ SUBDIRS = \
- mktree \
- mmap_exec \
- mmap_libaio \
-+ mmap_seek \
- mmapwrite \
- nvlist_to_lua \
- randwritecomp \
-diff --git a/tests/zfs-tests/cmd/mmap_seek/.gitignore b/tests/zfs-tests/cmd/mmap_seek/.gitignore
-new file mode 100644
-index 00000000000..6b05a791750
---- /dev/null
-+++ b/tests/zfs-tests/cmd/mmap_seek/.gitignore
-@@ -0,0 +1 @@
-+/mmap_seek
-diff --git a/tests/zfs-tests/cmd/mmap_seek/Makefile.am b/tests/zfs-tests/cmd/mmap_seek/Makefile.am
-new file mode 100644
-index 00000000000..b938931125f
---- /dev/null
-+++ b/tests/zfs-tests/cmd/mmap_seek/Makefile.am
-@@ -0,0 +1,6 @@
-+include $(top_srcdir)/config/Rules.am
-+
-+pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin
-+
-+pkgexec_PROGRAMS = mmap_seek
-+mmap_seek_SOURCES = mmap_seek.c
-diff --git a/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
-new file mode 100644
-index 00000000000..f476e1dba9a
---- /dev/null
-+++ b/tests/zfs-tests/cmd/mmap_seek/mmap_seek.c
-@@ -0,0 +1,147 @@
-+/*
-+ * CDDL HEADER START
-+ *
-+ * The contents of this file are subject to the terms of the
-+ * Common Development and Distribution License (the "License").
-+ * You may not use this file except in compliance with the License.
-+ *
-+ * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+ * or http://www.opensolaris.org/os/licensing.
-+ * See the License for the specific language governing permissions
-+ * and limitations under the License.
-+ *
-+ * When distributing Covered Code, include this CDDL HEADER in each
-+ * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+ * If applicable, add the following below this CDDL HEADER, with the
-+ * fields enclosed by brackets "[]" replaced with your own identifying
-+ * information: Portions Copyright [yyyy] [name of copyright owner]
-+ *
-+ * CDDL HEADER END
-+ */
-+
-+/*
-+ * Copyright (c) 2021 by Lawrence Livermore National Security, LLC.
-+ */
-+
-+#include <unistd.h>
-+#include <fcntl.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <sys/mman.h>
-+#include <errno.h>
-+
-+static void
-+seek_data(int fd, off_t offset, off_t expected)
-+{
-+ off_t data_offset = lseek(fd, offset, SEEK_DATA);
-+ if (data_offset != expected) {
-+ fprintf(stderr, "lseek(fd, %d, SEEK_DATA) = %d (expected %d)\n",
-+ (int)offset, (int)data_offset, (int)expected);
-+ exit(2);
-+ }
-+}
-+
-+static void
-+seek_hole(int fd, off_t offset, off_t expected)
-+{
-+ off_t hole_offset = lseek(fd, offset, SEEK_HOLE);
-+ if (hole_offset != expected) {
-+ fprintf(stderr, "lseek(fd, %d, SEEK_HOLE) = %d (expected %d)\n",
-+ (int)offset, (int)hole_offset, (int)expected);
-+ exit(2);
-+ }
-+}
-+
-+int
-+main(int argc, char **argv)
-+{
-+ char *execname = argv[0];
-+ char *file_path = argv[1];
-+ char *buf = NULL;
-+ int err;
-+
-+ if (argc != 4) {
-+ (void) printf("usage: %s <file name> <file size> "
-+ "<block size>\n", argv[0]);
-+ exit(1);
-+ }
-+
-+ int fd = open(file_path, O_RDWR | O_CREAT, 0666);
-+ if (fd == -1) {
-+ (void) fprintf(stderr, "%s: %s: ", execname, file_path);
-+ perror("open");
-+ exit(2);
-+ }
-+
-+ off_t file_size = atoi(argv[2]);
-+ off_t block_size = atoi(argv[3]);
-+
-+ if (block_size * 2 > file_size) {
-+ (void) fprintf(stderr, "file size must be at least "
-+ "double the block size\n");
-+ exit(2);
-+ }
-+
-+ err = ftruncate(fd, file_size);
-+ if (err == -1) {
-+ perror("ftruncate");
-+ exit(2);
-+ }
-+
-+ if ((buf = mmap(NULL, file_size, PROT_READ | PROT_WRITE,
-+ MAP_SHARED, fd, 0)) == MAP_FAILED) {
-+ perror("mmap");
-+ exit(2);
-+ }
-+
-+ /* Verify the file is sparse and reports no data. */
-+ seek_data(fd, 0, -1);
-+
-+ /* Verify the file is reported as a hole. */
-+ seek_hole(fd, 0, 0);
-+
-+ /* Verify search beyond end of file is an error. */
-+ seek_data(fd, 2 * file_size, -1);
-+ seek_hole(fd, 2 * file_size, -1);
-+
-+ /* Dirty the first byte. */
-+ memset(buf, 'a', 1);
-+ seek_data(fd, 0, 0);
-+ seek_data(fd, block_size, -1);
-+ seek_hole(fd, 0, block_size);
-+ seek_hole(fd, block_size, block_size);
-+
-+ /* Dirty the first half of the file. */
-+ memset(buf, 'b', file_size / 2);
-+ seek_data(fd, 0, 0);
-+ seek_data(fd, block_size, block_size);
-+ seek_hole(fd, 0, P2ROUNDUP(file_size / 2, block_size));
-+ seek_hole(fd, block_size, P2ROUNDUP(file_size / 2, block_size));
-+
-+ /* Dirty the whole file. */
-+ memset(buf, 'c', file_size);
-+ seek_data(fd, 0, 0);
-+ seek_data(fd, file_size * 3 / 4,
-+ P2ROUNDUP(file_size * 3 / 4, block_size));
-+ seek_hole(fd, 0, file_size);
-+ seek_hole(fd, file_size / 2, file_size);
-+
-+ /* Punch a hole (required compression be enabled). */
-+ memset(buf + block_size, 0, block_size);
-+ seek_data(fd, 0, 0);
-+ seek_data(fd, block_size, 2 * block_size);
-+ seek_hole(fd, 0, block_size);
-+ seek_hole(fd, block_size, block_size);
-+ seek_hole(fd, 2 * block_size, file_size);
-+
-+ err = munmap(buf, file_size);
-+ if (err == -1) {
-+ perror("munmap");
-+ exit(2);
-+ }
-+
-+ close(fd);
-+
-+ return (0);
-+}
-diff --git a/tests/zfs-tests/include/commands.cfg b/tests/zfs-tests/include/commands.cfg
-index 1ec73f25bae..4497a6248b4 100644
---- a/tests/zfs-tests/include/commands.cfg
-+++ b/tests/zfs-tests/include/commands.cfg
-@@ -209,6 +209,7 @@ export ZFSTEST_FILES='badsend
- mktree
- mmap_exec
- mmap_libaio
-+ mmap_seek
- mmapwrite
- nvlist_to_lua
- randfree_file
-diff --git a/tests/zfs-tests/include/tunables.cfg b/tests/zfs-tests/include/tunables.cfg
-index 56d430a3987..fff43e46916 100644
---- a/tests/zfs-tests/include/tunables.cfg
-+++ b/tests/zfs-tests/include/tunables.cfg
-@@ -33,6 +33,7 @@ DEADMAN_FAILMODE deadman.failmode zfs_deadman_failmode
- DEADMAN_SYNCTIME_MS deadman.synctime_ms zfs_deadman_synctime_ms
- DEADMAN_ZIOTIME_MS deadman.ziotime_ms zfs_deadman_ziotime_ms
- DISABLE_IVSET_GUID_CHECK disable_ivset_guid_check zfs_disable_ivset_guid_check
-+DMU_OFFSET_NEXT_SYNC dmu_offset_next_sync zfs_dmu_offset_next_sync
- INITIALIZE_CHUNK_SIZE initialize_chunk_size zfs_initialize_chunk_size
- INITIALIZE_VALUE initialize_value zfs_initialize_value
- KEEP_LOG_SPACEMAPS_AT_EXPORT keep_log_spacemaps_at_export zfs_keep_log_spacemaps_at_export
-diff --git a/tests/zfs-tests/tests/functional/mmap/Makefile.am b/tests/zfs-tests/tests/functional/mmap/Makefile.am
-index 2adc398b8c0..b26791ee7ce 100644
---- a/tests/zfs-tests/tests/functional/mmap/Makefile.am
-+++ b/tests/zfs-tests/tests/functional/mmap/Makefile.am
-@@ -4,7 +4,8 @@ dist_pkgdata_SCRIPTS = \
- cleanup.ksh \
- mmap_read_001_pos.ksh \
- mmap_write_001_pos.ksh \
-- mmap_libaio_001_pos.ksh
-+ mmap_libaio_001_pos.ksh \
-+ mmap_seek_001_pos.ksh
-
- dist_pkgdata_DATA = \
- mmap.cfg
-diff --git a/tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh b/tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh
-new file mode 100755
-index 00000000000..6188549ad8d
---- /dev/null
-+++ b/tests/zfs-tests/tests/functional/mmap/mmap_seek_001_pos.ksh
-@@ -0,0 +1,67 @@
-+#!/bin/ksh -p
-+#
-+# CDDL HEADER START
-+#
-+# The contents of this file are subject to the terms of the
-+# Common Development and Distribution License (the "License").
-+# You may not use this file except in compliance with the License.
-+#
-+# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
-+# or http://www.opensolaris.org/os/licensing.
-+# See the License for the specific language governing permissions
-+# and limitations under the License.
-+#
-+# When distributing Covered Code, include this CDDL HEADER in each
-+# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
-+# If applicable, add the following below this CDDL HEADER, with the
-+# fields enclosed by brackets "[]" replaced with your own identifying
-+# information: Portions Copyright [yyyy] [name of copyright owner]
-+#
-+# CDDL HEADER END
-+#
-+
-+#
-+# Copyright (c) 2021 by Lawrence Livermore National Security, LLC.
-+#
-+
-+. $STF_SUITE/include/libtest.shlib
-+. $STF_SUITE/tests/functional/mmap/mmap.cfg
-+
-+#
-+# DESCRIPTION:
-+# lseek() data/holes for an mmap()'d file.
-+#
-+# STRATEGY:
-+# 1. Enable compression and hole reporting for dirty files.
-+# 2. Call mmap_seek binary test case for various record sizes.
-+#
-+
-+verify_runnable "global"
-+
-+function cleanup
-+{
-+ log_must zfs set compression=off $TESTPOOL/$TESTFS
-+ log_must zfs set recordsize=128k $TESTPOOL/$TESTFS
-+ log_must rm -f $TESTDIR/test-mmap-file
-+ log_must set_tunable64 DMU_OFFSET_NEXT_SYNC $dmu_offset_next_sync
-+}
-+
-+log_assert "lseek() data/holes for an mmap()'d file."
-+
-+log_onexit cleanup
-+
-+# Enable hole reporting for dirty files.
-+typeset dmu_offset_next_sync=$(get_tunable DMU_OFFSET_NEXT_SYNC)
-+log_must set_tunable64 DMU_OFFSET_NEXT_SYNC 1
-+
-+# Compression must be enabled to convert zero'd blocks to holes.
-+# This behavior is checked by the mmap_seek test.
-+log_must zfs set compression=on $TESTPOOL/$TESTFS
-+
-+for bs in 4096 8192 16384 32768 65536 131072; do
-+ log_must zfs set recordsize=$bs $TESTPOOL/$TESTFS
-+ log_must mmap_seek $TESTDIR/test-mmap-file $((1024*1024)) $bs
-+ log_must rm $TESTDIR/test-mmap-file
-+done
-+
-+log_pass "lseek() data/holes for an mmap()'d file succeeded."
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.1-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.1-r2.ebuild
similarity index 98%
rename from sys-fs/zfs-kmod/zfs-kmod-2.1.1-r1.ebuild
rename to sys-fs/zfs-kmod/zfs-kmod-2.1.1-r2.ebuild
index 5939b99e648..1f2473e7964 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.1-r1.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.1-r2.ebuild
@@ -62,8 +62,6 @@ RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
-PATCHES=( "${FILESDIR}/2.1.1-fix-lseek-mmap.patch" )
-
pkg_pretend() {
use rootfs || return 0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2022-04-22 1:54 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-04-22 1:54 UTC (permalink / raw
To: gentoo-commits
commit: 3ac287680dc6014cf993afe44d99db03d0afa5ab
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Fri Apr 22 01:51:45 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 22 01:54:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ac28768
sys-fs/zfs-kmod: backport upstream ZERO_RANGE fix
Bug: https://github.com/openzfs/zfs/issues/13329
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-fs/zfs-kmod/files/2.1.4-ZERO_RANGE.patch | 304 +++++++++++++++++++++++++++
sys-fs/zfs-kmod/zfs-kmod-2.1.4-r1.ebuild | 209 ++++++++++++++++++
2 files changed, 513 insertions(+)
diff --git a/sys-fs/zfs-kmod/files/2.1.4-ZERO_RANGE.patch b/sys-fs/zfs-kmod/files/2.1.4-ZERO_RANGE.patch
new file mode 100644
index 000000000000..338b14208dab
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/2.1.4-ZERO_RANGE.patch
@@ -0,0 +1,304 @@
+https://github.com/openzfs/zfs/commit/c220771a47e4206fb43e6849957657c9504b1b14
+https://github.com/openzfs/zfs/issues/13329
+
+From c220771a47e4206fb43e6849957657c9504b1b14 Mon Sep 17 00:00:00 2001
+From: Rich Ercolani <214141+rincebrain@users.noreply.github.com>
+Date: Wed, 20 Apr 2022 19:07:03 -0400
+Subject: [PATCH] Corrected oversight in ZERO_RANGE behavior
+
+It turns out, no, in fact, ZERO_RANGE and PUNCH_HOLE do
+have differing semantics in some ways - in particular,
+one requires KEEP_SIZE, and the other does not.
+
+Also added a zero-range test to catch this, corrected a flaw
+that made the punch-hole test succeed vacuously, and a typo
+in file_write.
+
+Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
+Closes #13329
+Closes #13338
+--- a/module/os/linux/zfs/zpl_file.c
++++ b/module/os/linux/zfs/zpl_file.c
+@@ -781,11 +781,13 @@ zpl_fallocate_common(struct inode *ip, int mode, loff_t offset, loff_t len)
+ if (mode & (test_mode)) {
+ flock64_t bf;
+
+- if (offset > olen)
+- goto out_unmark;
++ if (mode & FALLOC_FL_KEEP_SIZE) {
++ if (offset > olen)
++ goto out_unmark;
+
+- if (offset + len > olen)
+- len = olen - offset;
++ if (offset + len > olen)
++ len = olen - offset;
++ }
+ bf.l_type = F_WRLCK;
+ bf.l_whence = SEEK_SET;
+ bf.l_start = offset;
+--- a/tests/runfiles/linux.run
++++ b/tests/runfiles/linux.run
+@@ -94,7 +94,7 @@ tests = ['events_001_pos', 'events_002_pos', 'zed_rc_filter', 'zed_fd_spill']
+ tags = ['functional', 'events']
+
+ [tests/functional/fallocate:Linux]
+-tests = ['fallocate_prealloc']
++tests = ['fallocate_prealloc', 'fallocate_zero-range']
+ tags = ['functional', 'fallocate']
+
+ [tests/functional/fault:Linux]
+--- a/tests/zfs-tests/cmd/file_write/file_write.c
++++ b/tests/zfs-tests/cmd/file_write/file_write.c
+@@ -251,7 +251,7 @@ usage(char *prog)
+ "\t[-s offset] [-c write_count] [-d data]\n\n"
+ "Where [data] equal to zero causes chars "
+ "0->%d to be repeated throughout, or [data]\n"
+- "equal to 'R' for psudorandom data.\n",
++ "equal to 'R' for pseudorandom data.\n",
+ prog, DATA_RANGE);
+
+ exit(1);
+--- a/tests/zfs-tests/include/libtest.shlib
++++ b/tests/zfs-tests/include/libtest.shlib
+@@ -4236,6 +4236,22 @@ function punch_hole # offset length file
+ esac
+ }
+
++function zero_range # offset length file
++{
++ typeset offset=$1
++ typeset length=$2
++ typeset file=$3
++
++ case "$UNAME" in
++ Linux)
++ fallocate --zero-range --offset $offset --length $length "$file"
++ ;;
++ *)
++ false
++ ;;
++ esac
++}
++
+ #
+ # Wait for the specified arcstat to reach non-zero quiescence.
+ # If echo is 1 echo the value after reaching quiescence, otherwise
+--- a/tests/zfs-tests/tests/functional/fallocate/Makefile.am
++++ b/tests/zfs-tests/tests/functional/fallocate/Makefile.am
+@@ -3,4 +3,5 @@ dist_pkgdata_SCRIPTS = \
+ setup.ksh \
+ cleanup.ksh \
+ fallocate_prealloc.ksh \
+- fallocate_punch-hole.ksh
++ fallocate_punch-hole.ksh \
++ fallocate_zero-range.ksh
+--- a/tests/zfs-tests/tests/functional/fallocate/fallocate_punch-hole.ksh
++++ b/tests/zfs-tests/tests/functional/fallocate/fallocate_punch-hole.ksh
+@@ -60,13 +60,17 @@ function cleanup
+ [[ -e $TESTDIR ]] && log_must rm -f $FILE
+ }
+
+-function check_disk_size
++function check_reported_size
+ {
+ typeset expected_size=$1
+
+- disk_size=$(du $TESTDIR/file | awk '{print $1}')
+- if [ $disk_size -ne $expected_size ]; then
+- log_fail "Incorrect size: $disk_size != $expected_size"
++ if ! [ -e "${FILE}" ]; then
++ log_fail "$FILE does not exist"
++ fi
++
++ reported_size=$(du "${FILE}" | awk '{print $1}')
++ if [ "$reported_size" != "$expected_size" ]; then
++ log_fail "Incorrect reported size: $reported_size != $expected_size"
+ fi
+ }
+
+@@ -74,9 +78,9 @@ function check_apparent_size
+ {
+ typeset expected_size=$1
+
+- apparent_size=$(stat_size)
+- if [ $apparent_size -ne $expected_size ]; then
+- log_fail "Incorrect size: $apparent_size != $expected_size"
++ apparent_size=$(stat_size "${FILE}")
++ if [ "$apparent_size" != "$expected_size" ]; then
++ log_fail "Incorrect apparent size: $apparent_size != $expected_size"
+ fi
+ }
+
+@@ -86,25 +90,30 @@ log_onexit cleanup
+
+ # Create a dense file and check it is the correct size.
+ log_must file_write -o create -f $FILE -b $BLKSZ -c 8
+-log_must check_disk_size $((131072 * 8))
++sync_pool $TESTPOOL
++log_must check_reported_size 1027
+
+ # Punch a hole for the first full block.
+ log_must punch_hole 0 $BLKSZ $FILE
+-log_must check_disk_size $((131072 * 7))
++sync_pool $TESTPOOL
++log_must check_reported_size 899
+
+ # Partially punch a hole in the second block.
+ log_must punch_hole $BLKSZ $((BLKSZ / 2)) $FILE
+-log_must check_disk_size $((131072 * 7))
++sync_pool $TESTPOOL
++log_must check_reported_size 899
+
+-# Punch a hole which overlaps the third and forth block.
++# Punch a hole which overlaps the third and fourth block.
+ log_must punch_hole $(((BLKSZ * 2) + (BLKSZ / 2))) $((BLKSZ)) $FILE
+-log_must check_disk_size $((131072 * 7))
++sync_pool $TESTPOOL
++log_must check_reported_size 899
+
+ # Punch a hole from the fifth block past the end of file. The apparent
+ # file size should not change since --keep-size is implied.
+ apparent_size=$(stat_size $FILE)
+ log_must punch_hole $((BLKSZ * 4)) $((BLKSZ * 10)) $FILE
+-log_must check_disk_size $((131072 * 4))
++sync_pool $TESTPOOL
++log_must check_reported_size 387
+ log_must check_apparent_size $apparent_size
+
+ log_pass "Ensure holes can be punched in files making them sparse"
+--- /dev/null
++++ b/tests/zfs-tests/tests/functional/fallocate/fallocate_zero-range.ksh
+@@ -0,0 +1,119 @@
++#!/bin/ksh -p
++#
++# CDDL HEADER START
++#
++# The contents of this file are subject to the terms of the
++# Common Development and Distribution License (the "License").
++# You may not use this file except in compliance with the License.
++#
++# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
++# or http://www.opensolaris.org/os/licensing.
++# See the License for the specific language governing permissions
++# and limitations under the License.
++#
++# When distributing Covered Code, include this CDDL HEADER in each
++# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
++# If applicable, add the following below this CDDL HEADER, with the
++# fields enclosed by brackets "[]" replaced with your own identifying
++# information: Portions Copyright [yyyy] [name of copyright owner]
++#
++# CDDL HEADER END
++#
++
++#
++# Copyright (c) 2020 by Lawrence Livermore National Security, LLC.
++# Copyright (c) 2021 by The FreeBSD Foundation.
++#
++
++. $STF_SUITE/include/libtest.shlib
++
++#
++# DESCRIPTION:
++# Test FALLOC_FL_ZERO_RANGE functionality
++#
++# STRATEGY:
++# 1. Create a dense file
++# 2. Zero various ranges in the file and verify the result.
++#
++
++verify_runnable "global"
++
++if is_freebsd; then
++ log_unsupported "FreeBSD does not implement an analogue to ZERO_RANGE."
++fi
++
++FILE=$TESTDIR/$TESTFILE0
++BLKSZ=$(get_prop recordsize $TESTPOOL)
++
++function cleanup
++{
++ [[ -e $TESTDIR ]] && log_must rm -f $FILE
++}
++
++# Helpfully, this function expects kilobytes, and check_apparent_size expects bytes.
++function check_reported_size
++{
++ typeset expected_size=$1
++
++ if ! [ -e "${FILE}" ]; then
++ log_fail "$FILE does not exist"
++ fi
++
++ reported_size=$(du "${FILE}" | awk '{print $1}')
++ if [ "$reported_size" != "$expected_size" ]; then
++ log_fail "Incorrect reported size: $reported_size != $expected_size"
++ fi
++}
++
++function check_apparent_size
++{
++ typeset expected_size=$1
++
++ apparent_size=$(stat_size "${FILE}")
++ if [ "$apparent_size" != "$expected_size" ]; then
++ log_fail "Incorrect apparent size: $apparent_size != $expected_size"
++ fi
++}
++
++log_assert "Ensure ranges can be zeroed in files"
++
++log_onexit cleanup
++
++# Create a dense file and check it is the correct size.
++log_must file_write -o create -f $FILE -b $BLKSZ -c 8
++sync_pool $TESTPOOL
++log_must check_reported_size 1027
++
++# Zero a range covering the first full block.
++log_must zero_range 0 $BLKSZ $FILE
++sync_pool $TESTPOOL
++log_must check_reported_size 899
++
++# Partially zero a range in the second block.
++log_must zero_range $BLKSZ $((BLKSZ / 2)) $FILE
++sync_pool $TESTPOOL
++log_must check_reported_size 899
++
++# Zero range which overlaps the third and fourth block.
++log_must zero_range $(((BLKSZ * 2) + (BLKSZ / 2))) $((BLKSZ)) $FILE
++sync_pool $TESTPOOL
++log_must check_reported_size 899
++
++# Zero range from the fifth block past the end of file, with --keep-size.
++# The apparent file size must not change, since we did specify --keep-size.
++apparent_size=$(stat_size $FILE)
++log_must fallocate --keep-size --zero-range --offset $((BLKSZ * 4)) --length $((BLKSZ * 10)) "$FILE"
++sync_pool $TESTPOOL
++log_must check_reported_size 387
++log_must check_apparent_size $apparent_size
++
++# Zero range from the fifth block past the end of file. The apparent
++# file size should change since --keep-size is not implied, unlike
++# with PUNCH_HOLE.
++apparent_size=$(stat_size $FILE)
++log_must zero_range $((BLKSZ * 4)) $((BLKSZ * 10)) $FILE
++sync_pool $TESTPOOL
++log_must check_reported_size 387
++log_must check_apparent_size $((BLKSZ * 14))
++
++log_pass "Ensure ranges can be zeroed in files"
+--- a/tests/zfs-tests/tests/functional/fallocate/setup.ksh
++++ b/tests/zfs-tests/tests/functional/fallocate/setup.ksh
+@@ -26,4 +26,7 @@
+ . $STF_SUITE/include/libtest.shlib
+
+ DISK=${DISKS%% *}
+-default_setup $DISK
++default_setup_noexit $DISK
++log_must zfs set compression=off $TESTPOOL
++log_pass
++
+
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.4-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.4-r1.ebuild
new file mode 100644
index 000000000000..55f1e5adc436
--- /dev/null
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.4-r1.ebuild
@@ -0,0 +1,209 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs
+
+DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
+HOMEPAGE="https://github.com/openzfs/zfs"
+
+if [[ ${PV} == "9999" ]]; then
+ inherit git-r3
+ EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
+else
+ VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc
+ inherit verify-sig
+
+ MY_PV="${PV/_rc/-rc}"
+ SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
+ SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
+ S="${WORKDIR}/zfs-${PV%_rc?}"
+ ZFS_KERNEL_COMPAT="5.17"
+
+ # increments minor eg 5.14 -> 5.15, and still supports override.
+ ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
+
+ if [[ ${PV} != *_rc* ]]; then
+ KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv"
+ fi
+fi
+
+LICENSE="CDDL MIT debug? ( GPL-2+ )"
+SLOT="0/${PVR}"
+IUSE="custom-cflags debug +rootfs"
+
+RDEPEND="${DEPEND}
+ !sys-kernel/spl
+"
+
+BDEPEND="
+ dev-lang/perl
+ virtual/awk
+"
+
+# we want dist-kernel block in BDEPEND because of portage resolver.
+# since linux-mod.eclass already sets version-unbounded dep, portage
+# will pull new versions. So we set it in BDEPEND which takes priority.
+# and we don't need in in git ebuild.
+if [[ ${PV} != "9999" ]] ; then
+ BDEPEND+="
+ verify-sig? ( sec-keys/openpgp-keys-openzfs )
+ dist-kernel? ( <virtual/dist-kernel-${ZFS_KERNEL_DEP}:= )
+ "
+fi
+
+# PDEPEND in this form is needed to trick portage suggest
+# enabling dist-kernel if only 1 package have it set
+PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
+
+RESTRICT="debug? ( strip ) test"
+
+DOCS=( AUTHORS COPYRIGHT META README.md )
+
+PATCHES=(
+ "${FILESDIR}"/${PV}-ZERO_RANGE.patch
+)
+
+pkg_pretend() {
+ use rootfs || return 0
+
+ if has_version virtual/dist-kernel && ! use dist-kernel; then
+ ewarn "You have virtual/dist-kernel installed, but"
+ ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
+ ewarn "It's recommended to globally enable dist-kernel USE flag"
+ ewarn "to auto-trigger initrd rebuilds with kernel updates"
+ fi
+}
+
+pkg_setup() {
+ CONFIG_CHECK="
+ !DEBUG_LOCK_ALLOC
+ EFI_PARTITION
+ MODULES
+ !PAX_KERNEXEC_PLUGIN_METHOD_OR
+ !TRIM_UNUSED_KSYMS
+ ZLIB_DEFLATE
+ ZLIB_INFLATE
+ "
+
+ use debug && CONFIG_CHECK="${CONFIG_CHECK}
+ FRAME_POINTER
+ DEBUG_INFO
+ !DEBUG_INFO_REDUCED
+ "
+
+ use rootfs && \
+ CONFIG_CHECK="${CONFIG_CHECK}
+ BLK_DEV_INITRD
+ DEVTMPFS
+ "
+
+ kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
+
+ if [[ ${PV} != "9999" ]]; then
+ local kv_major_max kv_minor_max zcompat
+ zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
+ kv_major_max="${zcompat%%.*}"
+ zcompat="${zcompat#*.}"
+ kv_minor_max="${zcompat%%.*}"
+ kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
+ "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
+
+ fi
+
+ kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
+
+ linux-mod_pkg_setup
+}
+
+src_prepare() {
+ default
+
+ # Run unconditionally (bug #792627)
+ eautoreconf
+
+ if [[ ${PV} != "9999" ]]; then
+ # Set module revision number
+ sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
+ fi
+}
+
+src_configure() {
+ set_arch_to_kernel
+
+ use custom-cflags || strip-flags
+
+ filter-ldflags -Wl,*
+
+ # Set CROSS_COMPILE in the environment.
+ # This allows the user to override it via make.conf or via a local Makefile.
+ # https://bugs.gentoo.org/811600
+ export CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-}
+
+ local myconf=(
+ HOSTCC="$(tc-getBUILD_CC)"
+ --bindir="${EPREFIX}/bin"
+ --sbindir="${EPREFIX}/sbin"
+ --with-config=kernel
+ --with-linux="${KV_DIR}"
+ --with-linux-obj="${KV_OUT_DIR}"
+ $(use_enable debug)
+ )
+
+ econf "${myconf[@]}"
+}
+
+src_compile() {
+ set_arch_to_kernel
+
+ myemakeargs=(
+ HOSTCC="$(tc-getBUILD_CC)"
+ V=1
+ )
+
+ emake "${myemakeargs[@]}"
+}
+
+src_install() {
+ set_arch_to_kernel
+
+ myemakeargs+=(
+ DEPMOD=:
+ # INSTALL_MOD_PATH ?= $(DESTDIR) in module/Makefile
+ DESTDIR="${D}"
+ )
+
+ emake "${myemakeargs[@]}" install
+
+ einstalldocs
+}
+
+pkg_postinst() {
+ linux-mod_pkg_postinst
+
+ if [[ -z ${ROOT} ]] && use dist-kernel; then
+ set_arch_to_portage
+ dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
+ fi
+
+ if use x86 || use arm; then
+ ewarn "32-bit kernels will likely require increasing vmalloc to"
+ ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
+ fi
+
+ if has_version sys-boot/grub; then
+ ewarn "This version of OpenZFS includes support for new feature flags"
+ ewarn "that are incompatible with previous versions. GRUB2 support for"
+ ewarn "/boot with the new feature flags is not yet available."
+ ewarn "Do *NOT* upgrade root pools to use the new feature flags."
+ ewarn "Any new pools will be created with the new feature flags by default"
+ ewarn "and will not be compatible with older versions of OpenZFS. To"
+ ewarn "create a newpool that is backward compatible wih GRUB2, use "
+ ewarn
+ ewarn "zpool create -o compatibility=grub2 ..."
+ ewarn
+ ewarn "Refer to /usr/share/zfs/compatibility.d/grub2 for list of features."
+ fi
+}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2022-06-07 18:47 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2022-06-07 18:47 UTC (permalink / raw
To: gentoo-commits
commit: d63ee4d2e784fceca7406466a7085df61c48f5ba
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Jun 7 18:44:53 2022 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Jun 7 18:44:53 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d63ee4d2
sys-fs/zfs-kmod: drop 0.8.6
Bug: https://bugs.gentoo.org/830020
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/Manifest | 1 -
sys-fs/zfs-kmod/files/0.8.6-copy-builtin.patch | 27 ----
sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild | 212 -------------------------
3 files changed, 240 deletions(-)
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 737e23e8e6ef..fbb9a55c3dc1 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,4 +1,3 @@
-DIST zfs-0.8.6.tar.gz 9295260 BLAKE2B 45424d710aaf75a05f766ae523ae157a24b5cbdcefe72a59e4cede81e42f7a92ae7f01150388437b78cd49f3d28b9664599f2a624516e6b3f1073497194a99f2 SHA512 626b172554f39a5c70f6ea5c599a92fae52534590d1b0273de2bbfc3676d29dff0eade8ca17e5f179a59870c12bc758fb53b7900f8a1fdbdef3a9161b93f9cce
DIST zfs-2.0.7.tar.gz 14550055 BLAKE2B 80f7297f04a21cd8f3f2043d895b0325512ba0cea3bb9223561237754495c8233d29af5a9418a3c06a87510100240a45ef3d59c7ce776fffb5aafdcd18167c21 SHA512 1135abf74bf74685439018f7cd65fc52088f179d113bdd2e6481689bb0f4a016716a07d859107b74501fda00689e80b2488c7c2c53d5f058d6b659909ed85f6f
DIST zfs-2.0.7.tar.gz.asc 836 BLAKE2B 65e7df58c33ccadc4e0ca9dbc1e8c006abbec8442e2da50872a1ab0cbb841fc45152298e8d3b93ee4320ddae6416e3a856caf80d8efb21b19db53dfedbf00e38 SHA512 b901d8e92faa6cfe6010bd54de88c7d18057f434cb07f8a89672d6c446a0a97b23209ee8f02cfd3b2a8f431c68ec977e7dc9f95fe5d385dba0bb6d37338ba682
DIST zfs-2.1.2.tar.gz 34829045 BLAKE2B ab4e2d85200438373c7eeeaa5256a712dbfb2862b85de1fb7554ad0cc2b9f8e1255ab4564bca62f65a81a823adb8c112957e6e8771b8e5e6944c3731bc894584 SHA512 3e3932259da2a27f1c4cca8da62b909edc43bf51ab0229d2d5d0234d9a7eaa7b63b67c06a98cbe2d29ba1eb5cbcaab16e5062c2a2bc8e84cab770be10ebf2102
diff --git a/sys-fs/zfs-kmod/files/0.8.6-copy-builtin.patch b/sys-fs/zfs-kmod/files/0.8.6-copy-builtin.patch
deleted file mode 100644
index 2b1ef8582546..000000000000
--- a/sys-fs/zfs-kmod/files/0.8.6-copy-builtin.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 0ce99b43b339226d62362f624d37f80a921eb197 Mon Sep 17 00:00:00 2001
-From: Georgy Yakovlev <gyakovlev@gentoo.org>
-Date: Fri, 18 Dec 2020 11:35:07 -0800
-Subject: [PATCH] copy-builtin: handle missing .gitignore
-
-acfc4944d0d6db114db9f2bb5401251c5bd767b6 broke copy-builtin in
-release tarballs, because those do not contain .gitignore file.
-Adding -f to rm call will make it return 0 even if file does not exist.
-
-Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
----
- copy-builtin | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/copy-builtin b/copy-builtin
-index 84f469fef02..6a6eb1f3695 100755
---- a/copy-builtin
-+++ b/copy-builtin
-@@ -36,7 +36,7 @@ rm -rf "$KERNEL_DIR/include/zfs" "$KERNEL_DIR/fs/zfs"
- cp --recursive include "$KERNEL_DIR/include/zfs"
- cp --recursive module "$KERNEL_DIR/fs/zfs"
- cp zfs_config.h "$KERNEL_DIR/include/zfs/"
--rm "$KERNEL_DIR/include/zfs/.gitignore"
-+rm -f "$KERNEL_DIR/include/zfs/.gitignore"
-
- for MODULE in "${MODULES[@]}"
- do
diff --git a/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild b/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild
deleted file mode 100644
index 49d364f92cc3..000000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-0.8.6.ebuild
+++ /dev/null
@@ -1,212 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=7
-
-inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://github.com/openzfs/zfs"
-
-if [[ ${PV} == "9999" ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
-else
- SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${PV}/zfs-${PV}.tar.gz"
- KEYWORDS="amd64 arm64 ppc64"
- S="${WORKDIR}/zfs-${PV}"
- ZFS_KERNEL_COMPAT="5.9"
-
- # increments minor eg 5.14 -> 5.15, and still supports override.
- ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
-fi
-
-LICENSE="CDDL debug? ( GPL-2+ )"
-SLOT="0/${PVR}"
-IUSE="custom-cflags debug +rootfs"
-
-DEPEND=""
-
-RDEPEND="${DEPEND}
- !sys-kernel/spl
-"
-
-BDEPEND="
- dev-lang/perl
- virtual/awk
- dist-kernel? ( <virtual/dist-kernel-${ZFS_KERNEL_DEP}:= )
-"
-
-# PDEPEND in this form is needed to trick portage suggest
-# enabling dist-kernel if only 1 package have it set
-PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
-
-RESTRICT="debug? ( strip ) test"
-
-DOCS=( AUTHORS COPYRIGHT META README.md )
-
-pkg_pretend() {
- use rootfs || return 0
-
- if has_version virtual/dist-kernel && ! use dist-kernel; then
- ewarn "You have virtual/dist-kernel installed, but"
- ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
- ewarn "It's recommended to globally enable dist-kernel USE flag"
- ewarn "to auto-trigger initrd rebuilds with kernel updates"
- fi
-}
-
-# https://github.com/openzfs/zfs/pull/11371
-PATCHES=( "${FILESDIR}/${PV}-copy-builtin.patch" )
-
-pkg_setup() {
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- if use arm64; then
- kernel_is -ge 5 && CONFIG_CHECK="${CONFIG_CHECK} !PREEMPT"
- fi
-
- kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
-
- if [[ ${PV} != "9999" ]]; then
- local kv_major_max kv_minor_max zcompat
- zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- kv_major_max="${zcompat%%.*}"
- zcompat="${zcompat#*.}"
- kv_minor_max="${zcompat%%.*}"
- kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
- "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
-
- # 0.8.x requires at least 2.6.32
- kernel_is ge 2 6 32 || die "Linux 2.6.32 or newer required"
- else
- # git master requires at least 3.10
- kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
- fi
-
- linux-mod_pkg_setup
-}
-
-src_prepare() {
- default
-
- if [[ ${PV} == "9999" ]]; then
- eautoreconf
- else
- # Set module revision number
- sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
- fi
-}
-
-src_configure() {
- set_arch_to_kernel
-
- use custom-cflags || strip-flags
-
- filter-ldflags -Wl,*
-
- # Set CROSS_COMPILE in the environment.
- # This allows the user to override it via make.conf or via a local Makefile.
- # https://bugs.gentoo.org/811600
- export CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-}
-
- local myconf=(
- HOSTCC="$(tc-getBUILD_CC)"
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
-
- CONFIG_SHELL="${EPREFIX}/bin/bash" econf "${myconf[@]}"
-}
-
-src_compile() {
- set_arch_to_kernel
-
- myemakeargs=(
- HOSTCC="$(tc-getBUILD_CC)"
- V=1
- )
-
- emake "${myemakeargs[@]}"
-}
-
-src_install() {
- set_arch_to_kernel
-
- myemakeargs+=(
- DEPMOD=:
- DESTDIR="${D}"
- INSTALL_MOD_PATH="${EPREFIX:-/}" # lib/modules/<kver> added by KBUILD
- )
-
- emake "${myemakeargs[@]}" install
-
- einstalldocs
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- # Remove old modules
- if [[ -d "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" ]]; then
- ewarn "${PN} now installs modules in ${EROOT}/lib/modules/${KV_FULL}/extra/zfs"
- ewarn "Old modules were detected in ${EROOT}/lib/modules/${KV_FULL}/addon/zfs"
- ewarn "Automatically removing old modules to avoid problems."
- rm -r "${EROOT}/lib/modules/${KV_FULL}/addon/zfs" || die "Cannot remove modules"
- rmdir --ignore-fail-on-non-empty "${EROOT}/lib/modules/${KV_FULL}/addon"
- fi
-
- if [[ -z ${ROOT} ]] && use dist-kernel; then
- set_arch_to_pkgmgr
- dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
- fi
-
- if use x86 || use arm; then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- ewarn "This version of OpenZFS includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of OpenZFS. To"
- ewarn "create a newpool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -d -o feature@async_destroy=enabled "
- ewarn " -o feature@empty_bpobj=enabled -o feature@lz4_compress=enabled"
- ewarn " -o feature@spacemap_histogram=enabled"
- ewarn " -o feature@enabled_txg=enabled "
- ewarn " -o feature@extensible_dataset=enabled -o feature@bookmarks=enabled"
- ewarn " ..."
- ewarn
- ewarn "GRUB2 support will be updated as soon as either the GRUB2"
- ewarn "developers do a tag or the Gentoo developers find time to backport"
- ewarn "support from GRUB2 HEAD."
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2022-06-30 10:37 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2022-06-30 10:37 UTC (permalink / raw
To: gentoo-commits
commit: 468b165fb4ef100a9fb630dffa4feda1ed3089c5
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Jun 30 10:37:42 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Jun 30 10:37:49 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=468b165f
sys-fs/zfs-kmod: backport build fixes
Closes: https://bugs.gentoo.org/855182
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-fs/zfs-kmod/files/2.1.5-build-issues.patch | 74 ++++++++++++++++++++++++++
sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild | 5 ++
2 files changed, 79 insertions(+)
diff --git a/sys-fs/zfs-kmod/files/2.1.5-build-issues.patch b/sys-fs/zfs-kmod/files/2.1.5-build-issues.patch
new file mode 100644
index 000000000000..cca6561b16f7
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/2.1.5-build-issues.patch
@@ -0,0 +1,74 @@
+https://github.com/openzfs/zfs/commit/a6e8113fed8a508ffda13cf1c4d8da99a4e8133a
+https://github.com/openzfs/zfs/commit/60e389ca10085acfa7cd35f79ab4465d968a942f
+Cherry-picked from https://github.com/openzfs/zfs/pull/13575
+
+https://bugs.gentoo.org/855182
+--- a/config/always-compiler-options.m4
++++ b/config/always-compiler-options.m4
+@@ -205,6 +205,29 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_NO_OMIT_FRAME_POINTER], [
+ AC_SUBST([NO_OMIT_FRAME_POINTER])
+ ])
+
++dnl #
++dnl # Check if cc supports -Winfinite-recursion option.
++dnl #
++AC_DEFUN([ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION], [
++ AC_MSG_CHECKING([whether $CC supports -Winfinite-recursion])
++
++ saved_flags="$CFLAGS"
++ CFLAGS="$CFLAGS -Werror -Winfinite-recursion"
++
++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [])], [
++ INFINITE_RECURSION=-Winfinite-recursion
++ AC_DEFINE([HAVE_INFINITE_RECURSION], 1,
++ [Define if compiler supports -Winfinite-recursion])
++ AC_MSG_RESULT([yes])
++ ], [
++ INFINITE_RECURSION=
++ AC_MSG_RESULT([no])
++ ])
++
++ CFLAGS="$saved_flags"
++ AC_SUBST([INFINITE_RECURSION])
++])
++
+ dnl #
+ dnl # Check if cc supports -fno-ipa-sra option.
+ dnl #
+--- a/config/zfs-build.m4
++++ b/config/zfs-build.m4
+@@ -211,6 +211,7 @@ AC_DEFUN([ZFS_AC_CONFIG_ALWAYS], [
+
+ ZFS_AC_CONFIG_ALWAYS_CC_NO_UNUSED_BUT_SET_VARIABLE
+ ZFS_AC_CONFIG_ALWAYS_CC_NO_BOOL_COMPARE
++ ZFS_AC_CONFIG_ALWAYS_CC_INFINITE_RECURSION
+ ZFS_AC_CONFIG_ALWAYS_CC_IMPLICIT_FALLTHROUGH
+ ZFS_AC_CONFIG_ALWAYS_CC_FRAME_LARGER_THAN
+ ZFS_AC_CONFIG_ALWAYS_CC_NO_FORMAT_TRUNCATION
+--- a/module/lua/ldo.c
++++ b/module/lua/ldo.c
+@@ -168,6 +168,13 @@ static void seterrorobj (lua_State *L, int errcode, StkId oldtop) {
+ L->top = oldtop + 1;
+ }
+
++/*
++ * Silence infinite recursion warning which was added to -Wall in gcc 12.1
++ */
++#if defined(HAVE_INFINITE_RECURSION)
++#pragma GCC diagnostic push
++#pragma GCC diagnostic ignored "-Winfinite-recursion"
++#endif
+
+ l_noret luaD_throw (lua_State *L, int errcode) {
+ if (L->errorJmp) { /* thread has an error handler? */
+@@ -190,6 +197,10 @@ l_noret luaD_throw (lua_State *L, int errcode) {
+ }
+ }
+
++#if defined(HAVE_INFINITE_RECURSION)
++#pragma GCC diagnostic pop
++#endif
++
+
+ int luaD_rawrunprotected (lua_State *L, Pfunc f, void *ud) {
+ unsigned short oldnCcalls = L->nCcalls;
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild
index 65567e49fef7..ac917091d0b4 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.5.ebuild
@@ -62,6 +62,11 @@ RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
+PATCHES=(
+ # bug #855182
+ "${FILESDIR}"/${PV}-build-issues.patch
+)
+
pkg_pretend() {
use rootfs || return 0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2023-01-13 4:33 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2023-01-13 4:33 UTC (permalink / raw
To: gentoo-commits
commit: 06df21657de6a4d31985750139fe4817c6a256ad
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 13 04:32:45 2023 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Jan 13 04:32:45 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06df2165
sys-fs/zfs-kmod: add ieee-long-double patch to 2.1.7
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../files/2.1.7-ppc64-ieee128-compat.patch | 217 +++++++++++++++++++++
sys-fs/zfs-kmod/zfs-kmod-2.1.7.ebuild | 5 +-
2 files changed, 221 insertions(+), 1 deletion(-)
diff --git a/sys-fs/zfs-kmod/files/2.1.7-ppc64-ieee128-compat.patch b/sys-fs/zfs-kmod/files/2.1.7-ppc64-ieee128-compat.patch
new file mode 100644
index 000000000000..5613cb8ca9d1
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/2.1.7-ppc64-ieee128-compat.patch
@@ -0,0 +1,217 @@
+From 8324d738fdb3096bd97336476bb399e6c312289a Mon Sep 17 00:00:00 2001
+From: Richard Yao <richard.yao@alumni.stonybrook.edu>
+Date: Thu, 12 Jan 2023 11:06:57 -0500
+Subject: [PATCH] Linux ppc64le ieee128 compat: Do not redefine __asm on
+ external headers
+
+There is an external assembly declaration extension in GNU C that glibc
+uses when building with ieee128 floating point support on ppc64le.
+Marking that as volatile makes no sense, so the build breaks.
+
+It does not make sense to only mark this as volatile on Linux, since if
+do not want the compiler reordering things on Linux, we do not want the
+compiler reordering things on any other platform, so we stop treating
+Linux specially and just manually inline the CPP macro so that we can
+eliminate it. This should fix the build on ppc64le.
+
+Closes openzfs/zfs#14308
+Signed-off-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
+---
+ .../vdev_raidz_math_powerpc_altivec_common.h | 44 +++++++++----------
+ 1 file changed, 20 insertions(+), 24 deletions(-)
+
+diff --git a/module/zfs/vdev_raidz_math_powerpc_altivec_common.h b/module/zfs/vdev_raidz_math_powerpc_altivec_common.h
+index 46d42c5e241..f76eb47a9c6 100644
+--- a/module/zfs/vdev_raidz_math_powerpc_altivec_common.h
++++ b/module/zfs/vdev_raidz_math_powerpc_altivec_common.h
+@@ -26,10 +26,6 @@
+ #include <sys/types.h>
+ #include <sys/simd.h>
+
+-#ifdef __linux__
+-#define __asm __asm__ __volatile__
+-#endif
+-
+ #define _REG_CNT(_0, _1, _2, _3, _4, _5, _6, _7, N, ...) N
+ #define REG_CNT(r...) _REG_CNT(r, 8, 7, 6, 5, 4, 3, 2, 1)
+
+@@ -142,7 +138,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 8: \
+- __asm( \
++ __asm__ __volatile__( \
+ "lvx 21,0,%[SRC0]\n" \
+ "lvx 20,0,%[SRC1]\n" \
+ "lvx 19,0,%[SRC2]\n" \
+@@ -172,7 +168,7 @@ typedef struct v {
+ : "v18", "v19", "v20", "v21"); \
+ break; \
+ case 4: \
+- __asm( \
++ __asm__ __volatile__( \
+ "lvx 21,0,%[SRC0]\n" \
+ "lvx 20,0,%[SRC1]\n" \
+ "lvx 19,0,%[SRC2]\n" \
+@@ -189,7 +185,7 @@ typedef struct v {
+ : "v18", "v19", "v20", "v21"); \
+ break; \
+ case 2: \
+- __asm( \
++ __asm__ __volatile__( \
+ "lvx 21,0,%[SRC0]\n" \
+ "lvx 20,0,%[SRC1]\n" \
+ "vxor " VR0(r) "," VR0(r) ",21\n" \
+@@ -208,7 +204,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 8: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vxor " VR4(r) "," VR4(r) "," VR0(r) "\n" \
+ "vxor " VR5(r) "," VR5(r) "," VR1(r) "\n" \
+ "vxor " VR6(r) "," VR6(r) "," VR2(r) "\n" \
+@@ -217,7 +213,7 @@ typedef struct v {
+ : RVR0(r), RVR1(r), RVR2(r), RVR3(r)); \
+ break; \
+ case 4: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vxor " VR2(r) "," VR2(r) "," VR0(r) "\n" \
+ "vxor " VR3(r) "," VR3(r) "," VR1(r) "\n" \
+ : UVR2(r), UVR3(r) \
+@@ -232,7 +228,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 8: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vxor " VR0(r) "," VR0(r) "," VR0(r) "\n" \
+ "vxor " VR1(r) "," VR1(r) "," VR1(r) "\n" \
+ "vxor " VR2(r) "," VR2(r) "," VR2(r) "\n" \
+@@ -245,7 +241,7 @@ typedef struct v {
+ WVR4(r), WVR5(r), WVR6(r), WVR7(r)); \
+ break; \
+ case 4: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vxor " VR0(r) "," VR0(r) "," VR0(r) "\n" \
+ "vxor " VR1(r) "," VR1(r) "," VR1(r) "\n" \
+ "vxor " VR2(r) "," VR2(r) "," VR2(r) "\n" \
+@@ -253,7 +249,7 @@ typedef struct v {
+ : WVR0(r), WVR1(r), WVR2(r), WVR3(r)); \
+ break; \
+ case 2: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vxor " VR0(r) "," VR0(r) "," VR0(r) "\n" \
+ "vxor " VR1(r) "," VR1(r) "," VR1(r) "\n" \
+ : WVR0(r), WVR1(r)); \
+@@ -267,7 +263,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 8: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vor " VR4(r) "," VR0(r) "," VR0(r) "\n" \
+ "vor " VR5(r) "," VR1(r) "," VR1(r) "\n" \
+ "vor " VR6(r) "," VR2(r) "," VR2(r) "\n" \
+@@ -276,7 +272,7 @@ typedef struct v {
+ : RVR0(r), RVR1(r), RVR2(r), RVR3(r)); \
+ break; \
+ case 4: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vor " VR2(r) "," VR0(r) "," VR0(r) "\n" \
+ "vor " VR3(r) "," VR1(r) "," VR1(r) "\n" \
+ : WVR2(r), WVR3(r) \
+@@ -291,7 +287,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 8: \
+- __asm( \
++ __asm__ __volatile__( \
+ "lvx " VR0(r) " ,0,%[SRC0]\n" \
+ "lvx " VR1(r) " ,0,%[SRC1]\n" \
+ "lvx " VR2(r) " ,0,%[SRC2]\n" \
+@@ -312,7 +308,7 @@ typedef struct v {
+ [SRC7] "r" ((OFFSET(src, 112)))); \
+ break; \
+ case 4: \
+- __asm( \
++ __asm__ __volatile__( \
+ "lvx " VR0(r) " ,0,%[SRC0]\n" \
+ "lvx " VR1(r) " ,0,%[SRC1]\n" \
+ "lvx " VR2(r) " ,0,%[SRC2]\n" \
+@@ -324,7 +320,7 @@ typedef struct v {
+ [SRC3] "r" ((OFFSET(src, 48)))); \
+ break; \
+ case 2: \
+- __asm( \
++ __asm__ __volatile__( \
+ "lvx " VR0(r) " ,0,%[SRC0]\n" \
+ "lvx " VR1(r) " ,0,%[SRC1]\n" \
+ : WVR0(r), WVR1(r) \
+@@ -340,7 +336,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 8: \
+- __asm( \
++ __asm__ __volatile__( \
+ "stvx " VR0(r) " ,0,%[DST0]\n" \
+ "stvx " VR1(r) " ,0,%[DST1]\n" \
+ "stvx " VR2(r) " ,0,%[DST2]\n" \
+@@ -362,7 +358,7 @@ typedef struct v {
+ : "memory"); \
+ break; \
+ case 4: \
+- __asm( \
++ __asm__ __volatile__( \
+ "stvx " VR0(r) " ,0,%[DST0]\n" \
+ "stvx " VR1(r) " ,0,%[DST1]\n" \
+ "stvx " VR2(r) " ,0,%[DST2]\n" \
+@@ -375,7 +371,7 @@ typedef struct v {
+ : "memory"); \
+ break; \
+ case 2: \
+- __asm( \
++ __asm__ __volatile__( \
+ "stvx " VR0(r) " ,0,%[DST0]\n" \
+ "stvx " VR1(r) " ,0,%[DST1]\n" \
+ : : [DST0] "r" ((OFFSET(dst, 0))), \
+@@ -400,7 +396,7 @@ typedef struct v {
+
+ #define MUL2_SETUP() \
+ { \
+- __asm( \
++ __asm__ __volatile__( \
+ "vspltisb " VR(16) ",14\n" \
+ "vspltisb " VR(17) ",15\n" \
+ "vaddubm " VR(16) "," VR(17) "," VR(16) "\n" \
+@@ -412,7 +408,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 4: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vcmpgtsb 19," VR(17) "," VR0(r) "\n" \
+ "vcmpgtsb 18," VR(17) "," VR1(r) "\n" \
+ "vcmpgtsb 21," VR(17) "," VR2(r) "\n" \
+@@ -434,7 +430,7 @@ typedef struct v {
+ : "v18", "v19", "v20", "v21"); \
+ break; \
+ case 2: \
+- __asm( \
++ __asm__ __volatile__( \
+ "vcmpgtsb 19," VR(17) "," VR0(r) "\n" \
+ "vcmpgtsb 18," VR(17) "," VR1(r) "\n" \
+ "vand 19,19," VR(16) "\n" \
+@@ -478,7 +474,7 @@ typedef struct v {
+ { \
+ switch (REG_CNT(r)) { \
+ case 2: \
+- __asm( \
++ __asm__ __volatile__( \
+ /* lts for upper part */ \
+ "vspltisb 15,15\n" \
+ "lvx 10,0,%[lt0]\n" \
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.7.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.7.ebuild
index d12dfd611acc..4b53b2ee95a4 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.7.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.7.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2022 Gentoo Authors
+# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -62,6 +62,9 @@ DOCS=( AUTHORS COPYRIGHT META README.md )
PATCHES=(
"${FILESDIR}"/${PN}-2.1.6-fgrep.patch
+
+ # https://github.com/openzfs/zfs/issues/14308
+ "${FILESDIR}"/2.1.7-ppc64-ieee128-compat.patch
)
pkg_pretend() {
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2023-01-24 21:04 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2023-01-24 21:04 UTC (permalink / raw
To: gentoo-commits
commit: ee070d0d2ea651c3f6cf50c335f5e98317d060ca
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 24 21:01:01 2023 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Tue Jan 24 21:03:40 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ee070d0d
sys-fs/zfs-kmod: revbump 2.1.8, revert 0156253
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch | 14 ++++++++++++++
.../{zfs-kmod-2.1.8.ebuild => zfs-kmod-2.1.8-r1.ebuild} | 5 +++++
2 files changed, 19 insertions(+)
diff --git a/sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch b/sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch
new file mode 100644
index 000000000000..13ab0575f4c8
--- /dev/null
+++ b/sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch
@@ -0,0 +1,14 @@
+@gyakovlev:
+revert: https://github.com/openzfs/zfs/commit/0156253d29a303bdcca3e535958e754d8f086e33
+due to: https://github.com/openzfs/zfs/issues/14413
+--- b/module/zfs/zio.c
++++ a/module/zfs/zio.c
+@@ -2827,7 +2827,7 @@
+ * have a third copy.
+ */
+ gbh_copies = MIN(copies + 1, spa_max_replication(spa));
++ if (gio->io_prop.zp_encrypt && gbh_copies >= SPA_DVAS_PER_BP)
+- if (BP_IS_ENCRYPTED(bp) && gbh_copies >= SPA_DVAS_PER_BP)
+ gbh_copies = SPA_DVAS_PER_BP - 1;
+
+ int flags = METASLAB_HINTBP_FAVOR | METASLAB_GANG_HEADER;
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.8.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.8-r1.ebuild
similarity index 98%
rename from sys-fs/zfs-kmod/zfs-kmod-2.1.8.ebuild
rename to sys-fs/zfs-kmod/zfs-kmod-2.1.8-r1.ebuild
index ac514d696c4f..4213efde8be1 100644
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.8.ebuild
+++ b/sys-fs/zfs-kmod/zfs-kmod-2.1.8-r1.ebuild
@@ -60,6 +60,11 @@ RESTRICT="debug? ( strip ) test"
DOCS=( AUTHORS COPYRIGHT META README.md )
+PATCHES=(
+ # https://github.com/openzfs/zfs/issues/14413
+ "${FILESDIR}/${PV}-gang-revert.patch"
+)
+
pkg_pretend() {
use rootfs || return 0
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2023-01-27 19:34 Georgy Yakovlev
0 siblings, 0 replies; 15+ messages in thread
From: Georgy Yakovlev @ 2023-01-27 19:34 UTC (permalink / raw
To: gentoo-commits
commit: 234cba44970ef6d6e2fa89fcd1a73f101b0781a6
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 27 19:24:04 2023 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Fri Jan 27 19:33:37 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=234cba44
sys-fs/zfs-kmod: drop 2.1.8-r1
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
sys-fs/zfs-kmod/Manifest | 2 -
sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch | 14 --
sys-fs/zfs-kmod/zfs-kmod-2.1.8-r1.ebuild | 217 --------------------------
3 files changed, 233 deletions(-)
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index e2e1f8bbdc71..f7e8d6284543 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -2,7 +2,5 @@ DIST zfs-2.1.6.tar.gz 34951282 BLAKE2B 615fe7a2128af77c6c855ea52b6503a78f0c992ea
DIST zfs-2.1.6.tar.gz.asc 836 BLAKE2B d85a79f8824a92c4d0a9682646f79c14871ebe27764289dc87cd9b0a773b7295538780401e70c492a9e4e7097ff2b3e459f7e0a7fdce2e2a59d3f467c41d88b3 SHA512 a83fcc00a8b35f1a1f9b94097d453019333a5351a3d78656dbd9ef732655ee817ccc88068c5ba11b5ff4a285e02250aee4169cc1450025edf547a2329fca7e15
DIST zfs-2.1.7.tar.gz 35092436 BLAKE2B 9c85c3eb72f3bb39bc4fd44aaa80338ca197a4e8183436fee73cd56705abfdaecfaf1b6fbe8dd508ccce707c8259c7ab6e1733b60b17757f0a7ff92d4e52bbad SHA512 6a31eb8fbee90ad1abcfedb9000991761aff7591b11362eb5ec6e0bb4b785a7004a251439409d7bd3f51fc995c859614da6313655337952f70bae07ac8ee0140
DIST zfs-2.1.7.tar.gz.asc 836 BLAKE2B 648fb818860a1cecc2ec42f23102e0466c038bfe48f5feca1ab58afb9cb439a0fe51cb89941f63a05c14d3b6f95c64dd3910c9a06b9cac14c467b963c65c2948 SHA512 4d4fef707bdfc37a82eb79aa0a21c71e30779bcf2ac54fe2df45a03e3302e2a45cb9f4e4ff0122b892b1e608a9f09e86d1334e0c7d9bf681780505f6e1439f9f
-DIST zfs-2.1.8.tar.gz 35109766 BLAKE2B e725a43e5a62998209d638adcec061858f0caf05abd30bcfbaf8c6f6b9f47209808d9fcd726a830ea800793cd719c4471a498a10dab66119c4d24dbf09b1c481 SHA512 9c6c2c30f55b089ce29f8895ccc9032615ab25e47291b2d3384bcbb3d1fdb2e7a6fb67725a6fae04b6e28bfdc6dc97fae3b9b3ed8f802e75866c83eabf79c296
-DIST zfs-2.1.8.tar.gz.asc 836 BLAKE2B 833457dee5948b255312c30da090c77cf8ec1d82b7498a8e85ccd8e4be12f948e9f00e742e76fc1392550756dd1d9c3b610fa29d25a61c41afe32b1c1a728602 SHA512 91f964e33772e77d1c4501e0ad526f2ff5cb45fb571bb25218f3f45f4662d544a92146633ef570d067bb7e6e7f36bd00da878b373143cae41611cae6f6c644cb
DIST zfs-2.1.9.tar.gz 35106538 BLAKE2B d7553cc162687531b254089e29e2e15e2eb6b362cecd8e70c24bbb5dbffbde82036ad2d416f4caeceaa324bee8a2e59d9e3cd8a3bf55a2e3c0718c7af9562812 SHA512 a3c410abe911be7d3d66af8ad7023a810eb4ae3284001e544c3a34275eb17a4916a7c094936a2628a590007c007eea84673efa9f3201fd9f24c499fd5ed3ed75
DIST zfs-2.1.9.tar.gz.asc 836 BLAKE2B 1e76525eab338398dd6ff7539ea4e7d18847d0f40e9093d813ec93fce5fa4c16e09f91c0805ba01a29190f673d131f85442c13035166d6f2d007a7e42dc15486 SHA512 35e1213fcac0458e1243355beba021dfefef455df2b341fbc4b10047f9ed4747df84e319d10ffe4bbcd572fbf014019e0dec200eb4e7d3c116fb805369182cb0
diff --git a/sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch b/sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch
deleted file mode 100644
index 13ab0575f4c8..000000000000
--- a/sys-fs/zfs-kmod/files/2.1.8-gang-revert.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-@gyakovlev:
-revert: https://github.com/openzfs/zfs/commit/0156253d29a303bdcca3e535958e754d8f086e33
-due to: https://github.com/openzfs/zfs/issues/14413
---- b/module/zfs/zio.c
-+++ a/module/zfs/zio.c
-@@ -2827,7 +2827,7 @@
- * have a third copy.
- */
- gbh_copies = MIN(copies + 1, spa_max_replication(spa));
-+ if (gio->io_prop.zp_encrypt && gbh_copies >= SPA_DVAS_PER_BP)
-- if (BP_IS_ENCRYPTED(bp) && gbh_copies >= SPA_DVAS_PER_BP)
- gbh_copies = SPA_DVAS_PER_BP - 1;
-
- int flags = METASLAB_HINTBP_FAVOR | METASLAB_GANG_HEADER;
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.8-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.8-r1.ebuild
deleted file mode 100644
index 4213efde8be1..000000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.8-r1.ebuild
+++ /dev/null
@@ -1,217 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools dist-kernel-utils flag-o-matic linux-mod toolchain-funcs
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://github.com/openzfs/zfs"
-
-if [[ ${PV} == "9999" ]]; then
- inherit git-r3
- EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/openzfs.asc
- inherit verify-sig
-
- MY_PV="${PV/_rc/-rc}"
- SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
- SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
- S="${WORKDIR}/zfs-${PV%_rc?}"
- ZFS_KERNEL_COMPAT="6.1"
-
- # increments minor eg 5.14 -> 5.15, and still supports override.
- ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
-
- if [[ ${PV} != *_rc* ]]; then
- KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~sparc"
- fi
-fi
-
-LICENSE="CDDL MIT debug? ( GPL-2+ )"
-SLOT="0/${PVR}"
-IUSE="custom-cflags debug +rootfs"
-
-RDEPEND="${DEPEND}"
-
-BDEPEND="
- dev-lang/perl
- app-alternatives/awk
-"
-
-# we want dist-kernel block in BDEPEND because of portage resolver.
-# since linux-mod.eclass already sets version-unbounded dep, portage
-# will pull new versions. So we set it in BDEPEND which takes priority.
-# and we don't need in in git ebuild.
-if [[ ${PV} != "9999" ]] ; then
- BDEPEND+="
- verify-sig? ( sec-keys/openpgp-keys-openzfs )
- dist-kernel? ( <virtual/dist-kernel-${ZFS_KERNEL_DEP}:= )
- "
-fi
-
-# PDEPEND in this form is needed to trick portage suggest
-# enabling dist-kernel if only 1 package have it set
-PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
-
-RESTRICT="debug? ( strip ) test"
-
-DOCS=( AUTHORS COPYRIGHT META README.md )
-
-PATCHES=(
- # https://github.com/openzfs/zfs/issues/14413
- "${FILESDIR}/${PV}-gang-revert.patch"
-)
-
-pkg_pretend() {
- use rootfs || return 0
-
- if has_version virtual/dist-kernel && ! use dist-kernel; then
- ewarn "You have virtual/dist-kernel installed, but"
- ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
- ewarn "It's recommended to globally enable dist-kernel USE flag"
- ewarn "to auto-trigger initrd rebuilds with kernel updates"
- fi
-}
-
-pkg_setup() {
- CONFIG_CHECK="
- !DEBUG_LOCK_ALLOC
- EFI_PARTITION
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- !TRIM_UNUSED_KSYMS
- ZLIB_DEFLATE
- ZLIB_INFLATE
- "
-
- use debug && CONFIG_CHECK="${CONFIG_CHECK}
- FRAME_POINTER
- DEBUG_INFO
- !DEBUG_INFO_REDUCED
- "
-
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK}
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is -lt 5 && CONFIG_CHECK="${CONFIG_CHECK} IOSCHED_NOOP"
-
- if [[ ${PV} != "9999" ]]; then
- local kv_major_max kv_minor_max zcompat
- zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- kv_major_max="${zcompat%%.*}"
- zcompat="${zcompat#*.}"
- kv_minor_max="${zcompat%%.*}"
- kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
- "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
-
- fi
-
- kernel_is -ge 3 10 || die "Linux 3.10 or newer required"
-
- linux-mod_pkg_setup
-}
-
-src_unpack() {
- if use verify-sig ; then
- # Needed for downloaded patch (which is unsigned, which is fine)
- verify-sig_verify_detached "${DISTDIR}"/zfs-${MY_PV}.tar.gz{,.asc}
- fi
-
- default
-}
-
-src_prepare() {
- default
-
- # Run unconditionally (bug #792627)
- eautoreconf
-
- if [[ ${PV} != "9999" ]]; then
- # Set module revision number
- sed -i "s/\(Release:\)\(.*\)1/\1\2${PR}-gentoo/" META || die "Could not set Gentoo release"
- fi
-}
-
-src_configure() {
- set_arch_to_kernel
-
- use custom-cflags || strip-flags
-
- filter-ldflags -Wl,*
-
- # Set CROSS_COMPILE in the environment.
- # This allows the user to override it via make.conf or via a local Makefile.
- # https://bugs.gentoo.org/811600
- export CROSS_COMPILE=${CROSS_COMPILE-${CHOST}-}
-
- local myconf=(
- HOSTCC="$(tc-getBUILD_CC)"
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
- )
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- set_arch_to_kernel
-
- myemakeargs=(
- HOSTCC="$(tc-getBUILD_CC)"
- V=1
- )
-
- emake "${myemakeargs[@]}"
-}
-
-src_install() {
- set_arch_to_kernel
-
- myemakeargs+=(
- DEPMOD=:
- # INSTALL_MOD_PATH ?= $(DESTDIR) in module/Makefile
- DESTDIR="${D}"
- )
-
- emake "${myemakeargs[@]}" install
-
- einstalldocs
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- if [[ -z ${ROOT} ]] && use dist-kernel; then
- set_arch_to_pkgmgr
- dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
- fi
-
- if use x86 || use arm; then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- if has_version sys-boot/grub; then
- ewarn "This version of OpenZFS includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of OpenZFS. To"
- ewarn "create a new pool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -o compatibility=grub2 ..."
- ewarn
- ewarn "Refer to /usr/share/zfs/compatibility.d/grub2 for list of features."
- fi
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/
@ 2023-12-28 3:43 Sam James
0 siblings, 0 replies; 15+ messages in thread
From: Sam James @ 2023-12-28 3:43 UTC (permalink / raw
To: gentoo-commits
commit: 20e398bbdcce0255ad5738232e66a992deda81d1
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Dec 28 03:39:15 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Dec 28 03:39:15 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=20e398bb
sys-fs/zfs-kmod: drop 2.1.12, 2.1.13, 2.1.13-r1
Signed-off-by: Sam James <sam <AT> gentoo.org>
sys-fs/zfs-kmod/Manifest | 4 -
...s_dmu_offset_next_sync-tunable-by-default.patch | 40 -----
sys-fs/zfs-kmod/zfs-kmod-2.1.12.ebuild | 177 --------------------
sys-fs/zfs-kmod/zfs-kmod-2.1.13-r1.ebuild | 178 ---------------------
sys-fs/zfs-kmod/zfs-kmod-2.1.13.ebuild | 177 --------------------
5 files changed, 576 deletions(-)
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index 1701e00a2c16..8c893b1a1e3f 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,7 +1,3 @@
-DIST zfs-2.1.12.tar.gz 35155013 BLAKE2B 652780e6bf7b63f45909110726d53795fada034f6044c8393fa3980e30217ada6931e3c2bb57210719e3c78c16f973f69287b7e2b475601f4ce12d701d9d96ae SHA512 f48493a21883e441cda705fb085353bed033f1620a1d0f93069c345c76cf2c0759a2e6f7a80c47c9398e9878abfe1d90d931fe5ceaf2588770a71491a434631e
-DIST zfs-2.1.12.tar.gz.asc 836 BLAKE2B 9215e732981a82254115cd17ec3c9810d4e9e5d5f7bb848778848f911478fc2e4bdbfc563e9835a2e876c26d9e0e8755724a0995baf9ad24e9265123e10cfddf SHA512 69c8b618947fd966eba0bba1c7326ddd463861f051a6cf1d06e23bd6d840fe7503f02adec2c3cbb203fa7b1cced51500f3689c224b653d13d227edd51b5a44f6
-DIST zfs-2.1.13.tar.gz 35170063 BLAKE2B 88f4b27a872071590294cf2a93d19633bacfaf1214fc4f06ab7ae7778376978754e0e2566d7bfe659d84426f525ecd05679b98310ddfc2d5938804c36fd03904 SHA512 d06fce8faa22b0cab2c69befa3842476703433fa90530d1fdf168716afd2039e97b124aa8ef581bed3bc19604fa2faa0bc1e29f6d028e3ef0085f0e34e05230a
-DIST zfs-2.1.13.tar.gz.asc 836 BLAKE2B 35d3299cfe1d37848f1a0e75a00e08a49a37356ccfc2f47fa1c5c64a1e16adc8030c35047fb45347ec4328d90703ed1623de1c799bef9b6297553aa7b357e8da SHA512 f35c89fd6b1019098b103427b525e32a691c796debde743f9d99953623d8c2bc6deb1ed88865e519d5fa60b259b1d74cce3c829dd1e2eb59aa29abc20046a0db
DIST zfs-2.1.14.tar.gz 35167471 BLAKE2B a7b22eaf05e4fbf416ebe4d7b884c515942fc9375c1dd322cefa00c19c550b9318a4192d6a909d49d58523c8f1a6eaf00189dd58e6543fae17cf8cc35042f469 SHA512 4a65c8b7d5576fa2dcc14e7ccaa93191c1d3791479cf89bd02c2bd04434ff5e93709b328796d4f9ba93da19f12772e359df373f40919350a3e1e4c52758b47c8
DIST zfs-2.1.14.tar.gz.asc 836 BLAKE2B f01bc58bf6c3d367c494ed4ea9f3fb1141f3aafdbf4f913b9e0d60d31557076d5ae0e25ca93b013f5fd85e21ba5ae9f61e1a03af54bb0c743869c0ce3d5519df SHA512 be0f386cce952b4047dc2448e356078668e8d4392802dd3bb1a426741f15f4d9fb689cd1cb09972bdbc9fe2e4e782ec4b4754fe811c5657bc1f5308bd38e3926
DIST zfs-2.2.1.tar.gz 33814243 BLAKE2B c3ff95c892024a11ee5c266b10e3354074606665a201fbab16e1ed12550340e0d991d98bd74f794331b68bd16cd6147a9e8937b8cda72d454abce72a22bafec6 SHA512 05e17046ac4f0ba923151be3e554e075db4783c8936c5dcee2d3b6d459fb386ba33f9eb38d15c185db58a1d26926147a66c3b3fe14e9de40987f0e95efa2bb31
diff --git a/sys-fs/zfs-kmod/files/zfs-kmod-2.1.13-Disable-zfs_dmu_offset_next_sync-tunable-by-default.patch b/sys-fs/zfs-kmod/files/zfs-kmod-2.1.13-Disable-zfs_dmu_offset_next_sync-tunable-by-default.patch
deleted file mode 100644
index c03398450e48..000000000000
--- a/sys-fs/zfs-kmod/files/zfs-kmod-2.1.13-Disable-zfs_dmu_offset_next_sync-tunable-by-default.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 2b266bd36980caefe353411bd56b2487c44aeb6e Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Fri, 24 Nov 2023 21:38:06 +0000
-Subject: [PATCH] Disable zfs_dmu_offset_next_sync tunable by default
-
-As a mitigation until more is understood and fixes are tested & reviewed, change
-the default of zfs_dmu_offset_next_sync from 1 to 0, as it was before
-05b3eb6d232009db247882a39d518e7282630753.
-
-There are no reported cases of The Bug being hit with zfs_dmu_offset_next_sync=1:
-that does not mean this is a cure or a real fix, but it _appears_ to be at least
-effective in reducing the chances of it happening. By itself, it's a safe change
-anyway, so it feels worth us doing while we wait.
-
-Bug: https://github.com/openzfs/zfs/issues/11900
-Bug: https://github.com/openzfs/zfs/issues/15526
-Bug: https://bugs.gentoo.org/917224
-Signed-off-by: Sam James <sam@gentoo.org>
---- a/man/man4/zfs.4
-+++ b/man/man4/zfs.4
-@@ -1646,7 +1646,7 @@ Allow no-operation writes.
- The occurrence of nopwrites will further depend on other pool properties
- .Pq i.a. the checksumming and compression algorithms .
- .
--.It Sy zfs_dmu_offset_next_sync Ns = Ns Sy 1 Ns | Ns 0 Pq int
-+.It Sy zfs_dmu_offset_next_sync Ns = Ns Sy 0 Ns | Ns 1 Pq int
- Enable forcing TXG sync to find holes.
- When enabled forces ZFS to sync data when
- .Sy SEEK_HOLE No or Sy SEEK_DATA
---- a/module/zfs/dmu.c
-+++ b/module/zfs/dmu.c
-@@ -80,7 +80,7 @@ unsigned long zfs_per_txg_dirty_frees_percent = 30;
- * Disabling this option will result in holes never being reported in dirty
- * files which is always safe.
- */
--int zfs_dmu_offset_next_sync = 1;
-+int zfs_dmu_offset_next_sync = 0;
-
- /*
- * Limit the amount we can prefetch with one call to this amount. This
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.12.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.12.ebuild
deleted file mode 100644
index 0e679e86ba92..000000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.12.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools dist-kernel-utils flag-o-matic linux-mod-r1 multiprocessing
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://github.com/openzfs/zfs"
-
-MODULES_KERNEL_MAX=6.3
-MODULES_KERNEL_MIN=3.10
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
- inherit git-r3
- unset MODULES_KERNEL_MAX
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc
- inherit verify-sig
-
- MY_PV=${PV/_rc/-rc}
- SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
- SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
- S="${WORKDIR}/zfs-${PV%_rc?}"
-
- ZFS_KERNEL_COMPAT="${MODULES_KERNEL_MAX}"
- # Increments minor eg 5.14 -> 5.15, and still supports override.
- ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="amd64 arm64 ppc64 ~riscv ~sparc"
- fi
-fi
-
-LICENSE="CDDL MIT debug? ( GPL-2+ )"
-SLOT="0/${PVR}"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="test"
-
-BDEPEND="
- dev-lang/perl
- app-alternatives/awk
-"
-
-if [[ ${PV} != 9999 ]] ; then
- BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )"
-
- IUSE+=" +dist-kernel-cap"
- RDEPEND="
- dist-kernel-cap? ( dist-kernel? (
- <virtual/dist-kernel-${ZFS_KERNEL_DEP}
- ) )
- "
-fi
-
-# Used to suggest matching USE, but without suggesting to disable
-PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.1.11-gentoo.patch
-)
-
-pkg_pretend() {
- use rootfs || return 0
-
- if has_version virtual/dist-kernel && ! use dist-kernel; then
- ewarn "You have virtual/dist-kernel installed, but"
- ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
- ewarn "It's recommended to globally enable dist-kernel USE flag"
- ewarn "to auto-trigger initrd rebuilds with kernel updates"
- fi
-}
-
-pkg_setup() {
- local CONFIG_CHECK="
- EFI_PARTITION
- ZLIB_DEFLATE
- ZLIB_INFLATE
- !DEBUG_LOCK_ALLOC
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- "
- use debug && CONFIG_CHECK+="
- DEBUG_INFO
- FRAME_POINTER
- !DEBUG_INFO_REDUCED
- "
- use rootfs && CONFIG_CHECK+="
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is -lt 5 && CONFIG_CHECK+=" IOSCHED_NOOP"
-
- if [[ ${PV} != 9999 ]] ; then
- local kv_major_max kv_minor_max zcompat
- zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- kv_major_max="${zcompat%%.*}"
- zcompat="${zcompat#*.}"
- kv_minor_max="${zcompat%%.*}"
- kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
- "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
- fi
-
- linux-mod-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Run unconditionally (bug #792627)
- eautoreconf
-
- if [[ ${PV} != 9999 ]] ; then
- # Set module revision number
- sed -Ei "s/(Release:.*)1/\1${PR}-gentoo/" META || die
- fi
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- local myconf=(
- --bindir="${EPREFIX}"/bin
- --sbindir="${EPREFIX}"/sbin
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
-
- # See gentoo.patch
- GENTOO_MAKEARGS_EVAL="${MODULES_MAKEARGS[*]@Q}"
- TEST_JOBS="$(makeopts_jobs)"
- )
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake "${MODULES_MAKEARGS[@]}"
-}
-
-src_install() {
- emake "${MODULES_MAKEARGS[@]}" DESTDIR="${ED}" install
- modules_post_process
-
- dodoc AUTHORS COPYRIGHT META README.md
-}
-
-pkg_postinst() {
- linux-mod-r1_pkg_postinst
-
- if [[ -z ${ROOT} ]] && use dist-kernel ; then
- dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
- fi
-
- if use x86 || use arm ; then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- if has_version sys-boot/grub ; then
- ewarn "This version of OpenZFS includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of OpenZFS. To"
- ewarn "create a new pool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -o compatibility=grub2 ..."
- ewarn
- ewarn "Refer to /usr/share/zfs/compatibility.d/grub2 for list of features."
- fi
-}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.13-r1.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.13-r1.ebuild
deleted file mode 100644
index f01cc9e5ac6d..000000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.13-r1.ebuild
+++ /dev/null
@@ -1,178 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools dist-kernel-utils flag-o-matic linux-mod-r1 multiprocessing
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://github.com/openzfs/zfs"
-
-MODULES_KERNEL_MAX=6.5
-MODULES_KERNEL_MIN=3.10
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
- inherit git-r3
- unset MODULES_KERNEL_MAX
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc
- inherit verify-sig
-
- MY_PV=${PV/_rc/-rc}
- SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
- SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
- S="${WORKDIR}/zfs-${PV%_rc?}"
-
- ZFS_KERNEL_COMPAT="${MODULES_KERNEL_MAX}"
- # Increments minor eg 5.14 -> 5.15, and still supports override.
- ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="amd64 arm64 ppc64 ~riscv ~sparc"
- fi
-fi
-
-LICENSE="CDDL MIT debug? ( GPL-2+ )"
-SLOT="0/${PVR}"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="test"
-
-BDEPEND="
- dev-lang/perl
- app-alternatives/awk
-"
-
-if [[ ${PV} != 9999 ]] ; then
- BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )"
-
- IUSE+=" +dist-kernel-cap"
- RDEPEND="
- dist-kernel-cap? ( dist-kernel? (
- <virtual/dist-kernel-${ZFS_KERNEL_DEP}
- ) )
- "
-fi
-
-# Used to suggest matching USE, but without suggesting to disable
-PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.1.11-gentoo.patch
- "${FILESDIR}"/${PN}-2.1.13-Disable-zfs_dmu_offset_next_sync-tunable-by-default.patch
-)
-
-pkg_pretend() {
- use rootfs || return 0
-
- if has_version virtual/dist-kernel && ! use dist-kernel; then
- ewarn "You have virtual/dist-kernel installed, but"
- ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
- ewarn "It's recommended to globally enable dist-kernel USE flag"
- ewarn "to auto-trigger initrd rebuilds with kernel updates"
- fi
-}
-
-pkg_setup() {
- local CONFIG_CHECK="
- EFI_PARTITION
- ZLIB_DEFLATE
- ZLIB_INFLATE
- !DEBUG_LOCK_ALLOC
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- "
- use debug && CONFIG_CHECK+="
- DEBUG_INFO
- FRAME_POINTER
- !DEBUG_INFO_REDUCED
- "
- use rootfs && CONFIG_CHECK+="
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is -lt 5 && CONFIG_CHECK+=" IOSCHED_NOOP"
-
- if [[ ${PV} != 9999 ]] ; then
- local kv_major_max kv_minor_max zcompat
- zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- kv_major_max="${zcompat%%.*}"
- zcompat="${zcompat#*.}"
- kv_minor_max="${zcompat%%.*}"
- kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
- "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
- fi
-
- linux-mod-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Run unconditionally (bug #792627)
- eautoreconf
-
- if [[ ${PV} != 9999 ]] ; then
- # Set module revision number
- sed -Ei "s/(Release:.*)1/\1${PR}-gentoo/" META || die
- fi
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- local myconf=(
- --bindir="${EPREFIX}"/bin
- --sbindir="${EPREFIX}"/sbin
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
-
- # See gentoo.patch
- GENTOO_MAKEARGS_EVAL="${MODULES_MAKEARGS[*]@Q}"
- TEST_JOBS="$(makeopts_jobs)"
- )
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake "${MODULES_MAKEARGS[@]}"
-}
-
-src_install() {
- emake "${MODULES_MAKEARGS[@]}" DESTDIR="${ED}" install
- modules_post_process
-
- dodoc AUTHORS COPYRIGHT META README.md
-}
-
-pkg_postinst() {
- linux-mod-r1_pkg_postinst
-
- if [[ -z ${ROOT} ]] && use dist-kernel ; then
- dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
- fi
-
- if use x86 || use arm ; then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- if has_version sys-boot/grub ; then
- ewarn "This version of OpenZFS includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of OpenZFS. To"
- ewarn "create a new pool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -o compatibility=grub2 ..."
- ewarn
- ewarn "Refer to /usr/share/zfs/compatibility.d/grub2 for list of features."
- fi
-}
diff --git a/sys-fs/zfs-kmod/zfs-kmod-2.1.13.ebuild b/sys-fs/zfs-kmod/zfs-kmod-2.1.13.ebuild
deleted file mode 100644
index c698d195b168..000000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.13.ebuild
+++ /dev/null
@@ -1,177 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools dist-kernel-utils flag-o-matic linux-mod-r1 multiprocessing
-
-DESCRIPTION="Linux ZFS kernel module for sys-fs/zfs"
-HOMEPAGE="https://github.com/openzfs/zfs"
-
-MODULES_KERNEL_MAX=6.5
-MODULES_KERNEL_MIN=3.10
-
-if [[ ${PV} == 9999 ]] ; then
- EGIT_REPO_URI="https://github.com/openzfs/zfs.git"
- inherit git-r3
- unset MODULES_KERNEL_MAX
-else
- VERIFY_SIG_OPENPGP_KEY_PATH=/usr/share/openpgp-keys/openzfs.asc
- inherit verify-sig
-
- MY_PV=${PV/_rc/-rc}
- SRC_URI="https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz"
- SRC_URI+=" verify-sig? ( https://github.com/openzfs/zfs/releases/download/zfs-${MY_PV}/zfs-${MY_PV}.tar.gz.asc )"
- S="${WORKDIR}/zfs-${PV%_rc?}"
-
- ZFS_KERNEL_COMPAT="${MODULES_KERNEL_MAX}"
- # Increments minor eg 5.14 -> 5.15, and still supports override.
- ZFS_KERNEL_DEP="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- ZFS_KERNEL_DEP="${ZFS_KERNEL_DEP%%.*}.$(( ${ZFS_KERNEL_DEP##*.} + 1))"
-
- if [[ ${PV} != *_rc* ]] ; then
- KEYWORDS="amd64 arm64 ppc64 ~riscv ~sparc"
- fi
-fi
-
-LICENSE="CDDL MIT debug? ( GPL-2+ )"
-SLOT="0/${PVR}"
-IUSE="custom-cflags debug +rootfs"
-RESTRICT="test"
-
-BDEPEND="
- dev-lang/perl
- app-alternatives/awk
-"
-
-if [[ ${PV} != 9999 ]] ; then
- BDEPEND+=" verify-sig? ( sec-keys/openpgp-keys-openzfs )"
-
- IUSE+=" +dist-kernel-cap"
- RDEPEND="
- dist-kernel-cap? ( dist-kernel? (
- <virtual/dist-kernel-${ZFS_KERNEL_DEP}
- ) )
- "
-fi
-
-# Used to suggest matching USE, but without suggesting to disable
-PDEPEND="dist-kernel? ( ~sys-fs/zfs-${PV}[dist-kernel] )"
-
-PATCHES=(
- "${FILESDIR}"/${PN}-2.1.11-gentoo.patch
-)
-
-pkg_pretend() {
- use rootfs || return 0
-
- if has_version virtual/dist-kernel && ! use dist-kernel; then
- ewarn "You have virtual/dist-kernel installed, but"
- ewarn "USE=\"dist-kernel\" is not enabled for ${CATEGORY}/${PN}"
- ewarn "It's recommended to globally enable dist-kernel USE flag"
- ewarn "to auto-trigger initrd rebuilds with kernel updates"
- fi
-}
-
-pkg_setup() {
- local CONFIG_CHECK="
- EFI_PARTITION
- ZLIB_DEFLATE
- ZLIB_INFLATE
- !DEBUG_LOCK_ALLOC
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- "
- use debug && CONFIG_CHECK+="
- DEBUG_INFO
- FRAME_POINTER
- !DEBUG_INFO_REDUCED
- "
- use rootfs && CONFIG_CHECK+="
- BLK_DEV_INITRD
- DEVTMPFS
- "
-
- kernel_is -lt 5 && CONFIG_CHECK+=" IOSCHED_NOOP"
-
- if [[ ${PV} != 9999 ]] ; then
- local kv_major_max kv_minor_max zcompat
- zcompat="${ZFS_KERNEL_COMPAT_OVERRIDE:-${ZFS_KERNEL_COMPAT}}"
- kv_major_max="${zcompat%%.*}"
- zcompat="${zcompat#*.}"
- kv_minor_max="${zcompat%%.*}"
- kernel_is -le "${kv_major_max}" "${kv_minor_max}" || die \
- "Linux ${kv_major_max}.${kv_minor_max} is the latest supported version"
- fi
-
- linux-mod-r1_pkg_setup
-}
-
-src_prepare() {
- default
-
- # Run unconditionally (bug #792627)
- eautoreconf
-
- if [[ ${PV} != 9999 ]] ; then
- # Set module revision number
- sed -Ei "s/(Release:.*)1/\1${PR}-gentoo/" META || die
- fi
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- filter-ldflags -Wl,*
-
- local myconf=(
- --bindir="${EPREFIX}"/bin
- --sbindir="${EPREFIX}"/sbin
- --with-config=kernel
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- $(use_enable debug)
-
- # See gentoo.patch
- GENTOO_MAKEARGS_EVAL="${MODULES_MAKEARGS[*]@Q}"
- TEST_JOBS="$(makeopts_jobs)"
- )
-
- econf "${myconf[@]}"
-}
-
-src_compile() {
- emake "${MODULES_MAKEARGS[@]}"
-}
-
-src_install() {
- emake "${MODULES_MAKEARGS[@]}" DESTDIR="${ED}" install
- modules_post_process
-
- dodoc AUTHORS COPYRIGHT META README.md
-}
-
-pkg_postinst() {
- linux-mod-r1_pkg_postinst
-
- if [[ -z ${ROOT} ]] && use dist-kernel ; then
- dist-kernel_reinstall_initramfs "${KV_DIR}" "${KV_FULL}"
- fi
-
- if use x86 || use arm ; then
- ewarn "32-bit kernels will likely require increasing vmalloc to"
- ewarn "at least 256M and decreasing zfs_arc_max to some value less than that."
- fi
-
- if has_version sys-boot/grub ; then
- ewarn "This version of OpenZFS includes support for new feature flags"
- ewarn "that are incompatible with previous versions. GRUB2 support for"
- ewarn "/boot with the new feature flags is not yet available."
- ewarn "Do *NOT* upgrade root pools to use the new feature flags."
- ewarn "Any new pools will be created with the new feature flags by default"
- ewarn "and will not be compatible with older versions of OpenZFS. To"
- ewarn "create a new pool that is backward compatible wih GRUB2, use "
- ewarn
- ewarn "zpool create -o compatibility=grub2 ..."
- ewarn
- ewarn "Refer to /usr/share/zfs/compatibility.d/grub2 for list of features."
- fi
-}
^ permalink raw reply related [flat|nested] 15+ messages in thread
end of thread, other threads:[~2023-12-28 3:43 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-24 21:04 [gentoo-commits] repo/gentoo:master commit in: sys-fs/zfs-kmod/files/, sys-fs/zfs-kmod/ Georgy Yakovlev
-- strict thread matches above, loose matches on Subject: below --
2023-12-28 3:43 Sam James
2023-01-27 19:34 Georgy Yakovlev
2023-01-13 4:33 Georgy Yakovlev
2022-06-30 10:37 Sam James
2022-06-07 18:47 Georgy Yakovlev
2022-04-22 1:54 Sam James
2021-11-08 6:09 Sam James
2020-11-03 20:07 Georgy Yakovlev
2020-08-26 23:35 Georgy Yakovlev
2019-12-13 23:43 Georgy Yakovlev
2019-06-23 8:00 Georgy Yakovlev
2019-04-26 21:09 Georgy Yakovlev
2019-01-09 6:31 Georgy Yakovlev
2015-09-18 12:50 Richard Yao
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox