summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2022-09-17 15:13:13 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2022-09-17 15:14:00 -0700
commit343037a0b292a176d153a7e188f259bb57162007 (patch)
tree3fbd5e7a16b6c3c605ecf13f52306d769124027c /sys-fs/zfs-kmod
parentsys-fs/zfs: drop 2.0.7-r1 (diff)
downloadgentoo-343037a0b292a176d153a7e188f259bb57162007.tar.gz
gentoo-343037a0b292a176d153a7e188f259bb57162007.tar.bz2
gentoo-343037a0b292a176d153a7e188f259bb57162007.zip
sys-fs/zfs-kmod: drop 2.1.4-r1
Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'sys-fs/zfs-kmod')
-rw-r--r--sys-fs/zfs-kmod/Manifest2
-rw-r--r--sys-fs/zfs-kmod/files/2.1.4-ZERO_RANGE.patch304
-rw-r--r--sys-fs/zfs-kmod/zfs-kmod-2.1.4-r1.ebuild209
3 files changed, 0 insertions, 515 deletions
diff --git a/sys-fs/zfs-kmod/Manifest b/sys-fs/zfs-kmod/Manifest
index e252f0fccc10..9e6e521d9fef 100644
--- a/sys-fs/zfs-kmod/Manifest
+++ b/sys-fs/zfs-kmod/Manifest
@@ -1,5 +1,3 @@
-DIST zfs-2.1.4.tar.gz 34896310 BLAKE2B be303f1181f604770536aa4aa61d5319ec408abbd04964cedadd15b3101a15deba6539bb5d833f4fed357f323d74f622d035305df699b213df41ae45bffdd200 SHA512 c7b57c43fc287b22905067ab022df4133d32e1a5dc335f7baf743b4ef88f64c2bf9d41318c2083230d077dd49e68f7d9e6172266e13d4b1eee29d359860f969e
-DIST zfs-2.1.4.tar.gz.asc 836 BLAKE2B b311730f72d534c87a782515f35a354bfbefba0513dc0cee5b0b497cf742590f13be6a49ff8a70d7d6503d0ba06b0266e7d290d718337add614812c3d1b0731a SHA512 53880cd5369f468551bab685eb83739ed76aa286886fdd2cbad4270755fe809da730082a91bba61011f59594fac297ce05645ae32c2c73b4a9aa835f2991a1ee
DIST zfs-2.1.5-patches.tar.xz 13324 BLAKE2B bfef8abd298cebd54491272b8c1deacace901d9a1acce67cb927bab6447eafd985352fd09f64336aa9d6611bab0e5c761d7973f0a65c408d77bb735a94c60253 SHA512 d2b009664f8eb4f2a8596693011fde578b6eae123c6169e5dfb70bd920c0f987f5177f7b1be008705a421574a8a9bc930f99823785c69e81573f18b0350cb9bd
DIST zfs-2.1.5.tar.gz 34951632 BLAKE2B c6e3efd9c0cda91654767eaad0eaaa05cd9a5daf1cb0384c9c78b30062f5c29142ac37ab9dbdaf96c91456d11c317d782d3524ade293f03fda983e5992b79e49 SHA512 d9ccf1049cefa9167d25f71fbdca70092cd02368b60f09341e6489fb68dc5f89e87b026b0191f4d81181a8851449124d824a1d959d0e2fb29c8a3d624edc4f03
DIST zfs-2.1.5.tar.gz.asc 836 BLAKE2B 4a81c266967540850a2cc824e79555ca9d05b2e17e45fa2723893cbd85b55e3d7d791986d6667b7ee1530e7692c03818f15e8b6798393b54989f90801b775786 SHA512 224b0dcf4982c63a8eff0a39d054537e7d023f7c35e154e4d20490b8daf184c076bc8e4de7d2c5af4059f8a802b747e637aad4479cd8d1330cf5b26da2f19c94
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
deleted file mode 100644
index 338b14208dab..000000000000
--- a/sys-fs/zfs-kmod/files/2.1.4-ZERO_RANGE.patch
+++ /dev/null
@@ -1,304 +0,0 @@
-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
deleted file mode 100644
index 05b9754f0ef2..000000000000
--- a/sys-fs/zfs-kmod/zfs-kmod-2.1.4-r1.ebuild
+++ /dev/null
@@ -1,209 +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
- 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_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 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
-}