[packages/zfs] - up to 2.1.1

baggins baggins at pld-linux.org
Sat Nov 6 23:52:01 CET 2021


commit f867d5e0d0afd175842a5cbc8445e012b95dc141
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sat Nov 6 23:51:47 2021 +0100

    - up to 2.1.1

 kernel-5.14.patch | 156 ------------------------------------------------------
 zfs.spec          |   8 ++-
 2 files changed, 3 insertions(+), 161 deletions(-)
---
diff --git a/zfs.spec b/zfs.spec
index f23e883..54e9ff2 100644
--- a/zfs.spec
+++ b/zfs.spec
@@ -24,20 +24,19 @@ exit 1
 
 %define		_duplicate_files_terminate_build	0
 
-%define	rel	2
+%define	rel	1
 %define	pname	zfs
 Summary:	Native Linux port of the ZFS filesystem
 Summary(pl.UTF-8):	Natywny linuksowy port systemu plików ZFS
 Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
-Version:	2.1.0
+Version:	2.1.1
 Release:	%{rel}%{?_pld_builder:%{?with_kernel:@%{_kernel_ver_str}}}
 License:	CDDL
 Group:		Applications/System
 Source0:	https://github.com/openzfs/zfs/releases/download/zfs-%{version}/%{pname}-%{version}.tar.gz
-# Source0-md5:	4520749a47d66a3e0b83d7b82a8c7e29
+# Source0-md5:	c9a68f49a70359bef88cf3fd3d8e91f0
 Patch0:		initdir.patch
 Patch1:		am.patch
-Patch2:		kernel-5.14.patch
 URL:		https://zfsonlinux.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -286,7 +285,6 @@ p=`pwd`\
 %setup -q -n %{pname}-%{version}
 %patch0 -p1
 %patch1 -p1
-%patch2 -p1
 
 %{__sed} -E -i -e '1s,#!\s*/usr/bin/env\s+python2(\s|$),#!%{__python}\1,' \
       cmd/arc_summary/arc_summary2
diff --git a/kernel-5.14.patch b/kernel-5.14.patch
deleted file mode 100644
index 58172a6..0000000
--- a/kernel-5.14.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From 1b06b03a7be88f4565c2c3114b8d3f2dc9f9408a Mon Sep 17 00:00:00 2001
-From: Brian Behlendorf <behlendorf1 at llnl.gov>
-Date: Fri, 23 Jul 2021 15:28:03 -0700
-Subject: [PATCH] Linux 5.14 compat: blk_alloc_disk()
-
-In Linux 5.14, blk_alloc_queue is no longer exported, and its usage
-has been superseded by blk_alloc_disk, which returns a gendisk struct
-from which we can still retrieve the struct request_queue* that is
-needed in the one place where it is used. This also replaces the call
-to alloc_disk(minors), and minors is now set via struct member
-assignment.
-
-Reviewed-by: Tony Nguyen <tony.nguyen at delphix.com>
-Reviewed-by: Olaf Faaland <faaland1 at llnl.gov>
-Reviewed-by: Coleman Kane <ckane at colemankane.org>
-Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
-Closes #12362
-Closes #12409
----
- config/kernel-make-request-fn.m4 | 20 +++++++++++++++
- module/os/linux/zfs/zvol_os.c    | 43 +++++++++++++++++++++++++-------
- 2 files changed, 54 insertions(+), 9 deletions(-)
-
-diff --git a/config/kernel-make-request-fn.m4 b/config/kernel-make-request-fn.m4
-index 290ef6b8da7..86b202a7a27 100644
---- a/config/kernel-make-request-fn.m4
-+++ b/config/kernel-make-request-fn.m4
-@@ -42,6 +42,13 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
- 		struct block_device_operations o;
- 		o.submit_bio = NULL;
- 	])
-+
-+	ZFS_LINUX_TEST_SRC([blk_alloc_disk], [
-+		#include <linux/blkdev.h>
-+	],[
-+		struct gendisk *disk  __attribute__ ((unused));
-+		disk = blk_alloc_disk(NUMA_NO_NODE);
-+	])
- ])
- 
- AC_DEFUN([ZFS_AC_KERNEL_MAKE_REQUEST_FN], [
-@@ -56,6 +63,19 @@ AC_DEFUN([ZFS_AC_KERNEL_MAKE_REQUEST_FN], [
- 
- 		AC_DEFINE(HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS, 1,
- 		    [submit_bio is member of struct block_device_operations])
-+
-+		dnl #
-+		dnl # Linux 5.14 API Change:
-+		dnl # blk_alloc_queue() + alloc_disk() combo replaced by
-+		dnl # a single call to blk_alloc_disk().
-+		dnl #
-+		AC_MSG_CHECKING([whether blk_alloc_disk() exists])
-+		ZFS_LINUX_TEST_RESULT([blk_alloc_disk], [
-+			AC_MSG_RESULT(yes)
-+			AC_DEFINE([HAVE_BLK_ALLOC_DISK], 1, [blk_alloc_disk() exists])
-+		], [
-+			AC_MSG_RESULT(no)
-+		])
- 	],[
- 		AC_MSG_RESULT(no)
- 
-diff --git a/module/os/linux/zfs/zvol_os.c b/module/os/linux/zfs/zvol_os.c
-index 741979f11af..8b29d73a3e0 100644
---- a/module/os/linux/zfs/zvol_os.c
-+++ b/module/os/linux/zfs/zvol_os.c
-@@ -762,7 +762,7 @@ static struct block_device_operations zvol_ops = {
- 	.getgeo			= zvol_getgeo,
- 	.owner			= THIS_MODULE,
- #ifdef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS
--    .submit_bio		= zvol_submit_bio,
-+	.submit_bio		= zvol_submit_bio,
- #endif
- };
- 
-@@ -795,13 +795,40 @@ zvol_alloc(dev_t dev, const char *name)
- 	mutex_init(&zv->zv_state_lock, NULL, MUTEX_DEFAULT, NULL);
- 
- #ifdef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS
-+#ifdef HAVE_BLK_ALLOC_DISK
-+	zso->zvo_disk = blk_alloc_disk(NUMA_NO_NODE);
-+	if (zso->zvo_disk == NULL)
-+		goto out_kmem;
-+
-+	zso->zvo_disk->minors = ZVOL_MINORS;
-+	zso->zvo_queue = zso->zvo_disk->queue;
-+#else
- 	zso->zvo_queue = blk_alloc_queue(NUMA_NO_NODE);
-+	if (zso->zvo_queue == NULL)
-+		goto out_kmem;
-+
-+	zso->zvo_disk = alloc_disk(ZVOL_MINORS);
-+	if (zso->zvo_disk == NULL) {
-+		blk_cleanup_queue(zso->zvo_queue);
-+		goto out_kmem;
-+	}
-+
-+	zso->zvo_disk->queue = zso->zvo_queue;
-+#endif /* HAVE_BLK_ALLOC_DISK */
- #else
- 	zso->zvo_queue = blk_generic_alloc_queue(zvol_request, NUMA_NO_NODE);
--#endif
- 	if (zso->zvo_queue == NULL)
- 		goto out_kmem;
- 
-+	zso->zvo_disk = alloc_disk(ZVOL_MINORS);
-+	if (zso->zvo_disk == NULL) {
-+		blk_cleanup_queue(zso->zvo_queue);
-+		goto out_kmem;
-+	}
-+
-+	zso->zvo_disk->queue = zso->zvo_queue;
-+#endif /* HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS */
-+
- 	blk_queue_set_write_cache(zso->zvo_queue, B_TRUE, B_TRUE);
- 
- 	/* Limit read-ahead to a single page to prevent over-prefetching. */
-@@ -810,10 +837,6 @@ zvol_alloc(dev_t dev, const char *name)
- 	/* Disable write merging in favor of the ZIO pipeline. */
- 	blk_queue_flag_set(QUEUE_FLAG_NOMERGES, zso->zvo_queue);
- 
--	zso->zvo_disk = alloc_disk(ZVOL_MINORS);
--	if (zso->zvo_disk == NULL)
--		goto out_queue;
--
- 	zso->zvo_queue->queuedata = zv;
- 	zso->zvo_dev = dev;
- 	zv->zv_open_count = 0;
-@@ -844,14 +867,11 @@ zvol_alloc(dev_t dev, const char *name)
- 	zso->zvo_disk->first_minor = (dev & MINORMASK);
- 	zso->zvo_disk->fops = &zvol_ops;
- 	zso->zvo_disk->private_data = zv;
--	zso->zvo_disk->queue = zso->zvo_queue;
- 	snprintf(zso->zvo_disk->disk_name, DISK_NAME_LEN, "%s%d",
- 	    ZVOL_DEV_NAME, (dev & MINORMASK));
- 
- 	return (zv);
- 
--out_queue:
--	blk_cleanup_queue(zso->zvo_queue);
- out_kmem:
- 	kmem_free(zso, sizeof (struct zvol_state_os));
- 	kmem_free(zv, sizeof (zvol_state_t));
-@@ -882,8 +902,13 @@ zvol_free(zvol_state_t *zv)
- 	zfs_rangelock_fini(&zv->zv_rangelock);
- 
- 	del_gendisk(zv->zv_zso->zvo_disk);
-+#if defined(HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS) && \
-+	defined(HAVE_BLK_ALLOC_DISK)
-+	blk_cleanup_disk(zv->zv_zso->zvo_disk);
-+#else
- 	blk_cleanup_queue(zv->zv_zso->zvo_queue);
- 	put_disk(zv->zv_zso->zvo_disk);
-+#endif
- 
- 	ida_simple_remove(&zvol_ida,
- 	    MINOR(zv->zv_zso->zvo_dev) >> ZVOL_MINOR_BITS);
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zfs.git/commitdiff/f867d5e0d0afd175842a5cbc8445e012b95dc141



More information about the pld-cvs-commit mailing list