[pve-devel] [PATCH zfsonlinux 03/15] rebase patches on top of zfs-0.8.0

Stoiko Ivanov s.ivanov at proxmox.com
Thu May 23 23:11:30 CEST 2019


rebase done with export-patchqueue and adapted to new 0.8 release

Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 ...-for-META-and-DCH-consistency-in-autoconf.patch |  4 +-
 ...util-to-LIBADD-for-libzfs-and-libzfs_core.patch | 37 -------------
 ...h => 0002-always-load-ZFS-module-on-boot.patch} |  0
 ...th-to-the-zed-binary-on-the-systemd-unit.patch} |  6 +--
 ...3-add-man-page-reference-to-systemd-units.patch | 60 ---------------------
 ...increase-default-zcmd-allocation-to-256K.patch} |  4 +-
 ...rt-with-d-dev-disk-by-id-in-scan-service.patch} |  4 +-
 ...d-emails.patch => 0006-Enable-zed-emails.patch} |  2 +-
 ...-for-arcstat.py-arc_summary.py-dbufstat.p.patch | 41 ---------------
 ...dlock-between-zfs-umount-snapentry_expire.patch | 61 ----------------------
 zfs/debian/patches/series                          | 14 ++---
 11 files changed, 15 insertions(+), 218 deletions(-)
 delete mode 100644 zfs/debian/patches/0002-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch
 rename zfs/debian/patches/{0004-always-load-ZFS-module-on-boot.patch => 0002-always-load-ZFS-module-on-boot.patch} (100%)
 rename zfs/debian/patches/{0007-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch => 0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch} (87%)
 delete mode 100644 zfs/debian/patches/0003-add-man-page-reference-to-systemd-units.patch
 rename zfs/debian/patches/{0008-increase-default-zcmd-allocation-to-256K.patch => 0004-increase-default-zcmd-allocation-to-256K.patch} (97%)
 rename zfs/debian/patches/{0009-import-with-d-dev-disk-by-id-in-scan-service.patch => 0005-import-with-d-dev-disk-by-id-in-scan-service.patch} (91%)
 rename zfs/debian/patches/{0011-Enable-zed-emails.patch => 0006-Enable-zed-emails.patch} (96%)
 delete mode 100644 zfs/debian/patches/0006-Use-python3-for-arcstat.py-arc_summary.py-dbufstat.p.patch
 delete mode 100644 zfs/debian/patches/0010-Fix-deadlock-between-zfs-umount-snapentry_expire.patch

diff --git a/zfs/debian/patches/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch b/zfs/debian/patches/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
index 0533942..6a89fe3 100644
--- a/zfs/debian/patches/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
+++ b/zfs/debian/patches/0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] Check-for-META-and-DCH-consistency-in-autoconf
  1 file changed, 29 insertions(+), 5 deletions(-)
 
 diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4
-index 3e1429d99..b8e26c492 100644
+index aa0fc1420..f525e2010 100644
 --- a/config/zfs-meta.m4
 +++ b/config/zfs-meta.m4
 @@ -1,9 +1,10 @@
@@ -35,7 +35,7 @@ index 3e1429d99..b8e26c492 100644
  
  		ZFS_META_NAME=_ZFS_AC_META_GETVAL([(Name|Project|Package)]);
  		if test -n "$ZFS_META_NAME"; then
-@@ -66,8 +68,30 @@ AC_DEFUN([ZFS_AC_META], [
+@@ -69,8 +71,30 @@ AC_DEFUN([ZFS_AC_META], [
  			AC_SUBST([ZFS_META_VERSION])
  		fi
  
diff --git a/zfs/debian/patches/0002-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch b/zfs/debian/patches/0002-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch
deleted file mode 100644
index 2dd47c8..0000000
--- a/zfs/debian/patches/0002-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Debian ZFS on Linux maintainers
- <pkg-zfsonlinux-devel at alioth-lists.debian.net>
-Date: Wed, 30 Jan 2019 15:12:04 +0100
-Subject: [PATCH] Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core
-
----
- lib/libzfs/Makefile.am      | 1 +
- lib/libzfs_core/Makefile.am | 3 ++-
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/lib/libzfs/Makefile.am b/lib/libzfs/Makefile.am
-index f1260ea71..5b07b9d9d 100644
---- a/lib/libzfs/Makefile.am
-+++ b/lib/libzfs/Makefile.am
-@@ -31,6 +31,7 @@ nodist_libzfs_la_SOURCES = \
- 
- libzfs_la_LIBADD = \
- 	$(top_builddir)/lib/libzfs_core/libzfs_core.la \
-+	$(top_builddir)/lib/libuutil/libuutil.la \
- 	$(top_builddir)/lib/libshare/libshare.la \
- 	$(top_builddir)/lib/libnvpair/libnvpair.la \
- 	$(top_builddir)/lib/libzpool/libzpool.la
-diff --git a/lib/libzfs_core/Makefile.am b/lib/libzfs_core/Makefile.am
-index 5eafc25c0..10d6de3d6 100644
---- a/lib/libzfs_core/Makefile.am
-+++ b/lib/libzfs_core/Makefile.am
-@@ -16,7 +16,8 @@ nodist_libzfs_core_la_SOURCES = \
- 	$(KERNEL_C)
- 
- libzfs_core_la_LIBADD = \
--	$(top_builddir)/lib/libnvpair/libnvpair.la
-+	$(top_builddir)/lib/libnvpair/libnvpair.la \
-+	$(top_builddir)/lib/libuutil/libuutil.la
- 
- libzfs_core_la_LDFLAGS = -version-info 1:0:0
- 
diff --git a/zfs/debian/patches/0004-always-load-ZFS-module-on-boot.patch b/zfs/debian/patches/0002-always-load-ZFS-module-on-boot.patch
similarity index 100%
rename from zfs/debian/patches/0004-always-load-ZFS-module-on-boot.patch
rename to zfs/debian/patches/0002-always-load-ZFS-module-on-boot.patch
diff --git a/zfs/debian/patches/0007-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch b/zfs/debian/patches/0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
similarity index 87%
rename from zfs/debian/patches/0007-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
rename to zfs/debian/patches/0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
index 9a78933..4714094 100644
--- a/zfs/debian/patches/0007-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
+++ b/zfs/debian/patches/0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
@@ -11,11 +11,11 @@ they ship their own zfs-zed unit.
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/etc/systemd/system/zfs-zed.service.in b/etc/systemd/system/zfs-zed.service.in
-index e3dec3dca..0b85f169a 100644
+index f4313625e..444e776fd 100644
 --- a/etc/systemd/system/zfs-zed.service.in
 +++ b/etc/systemd/system/zfs-zed.service.in
-@@ -5,7 +5,7 @@ After=zfs-import-cache.service
- After=zfs-import-scan.service
+@@ -3,7 +3,7 @@ Description=ZFS Event Daemon (zed)
+ Documentation=man:zed(8)
  
  [Service]
 -ExecStart=@sbindir@/zed -F
diff --git a/zfs/debian/patches/0003-add-man-page-reference-to-systemd-units.patch b/zfs/debian/patches/0003-add-man-page-reference-to-systemd-units.patch
deleted file mode 100644
index 144143f..0000000
--- a/zfs/debian/patches/0003-add-man-page-reference-to-systemd-units.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler at proxmox.com>
-Date: Mon, 4 Sep 2017 10:59:32 +0200
-Subject: [PATCH] add man page reference to systemd units
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Signed-off-by: Fabian Grünbichler <f.gruenbichler at proxmox.com>
----
- etc/systemd/system/zfs-import-cache.service.in | 1 +
- etc/systemd/system/zfs-import-scan.service.in  | 1 +
- etc/systemd/system/zfs-mount.service.in        | 1 +
- etc/systemd/system/zfs-share.service.in        | 1 +
- 4 files changed, 4 insertions(+)
-
-diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in
-index 97808dee7..cb4358fb4 100644
---- a/etc/systemd/system/zfs-import-cache.service.in
-+++ b/etc/systemd/system/zfs-import-cache.service.in
-@@ -1,5 +1,6 @@
- [Unit]
- Description=Import ZFS pools by cache file
-+Documentation=man:zpool(8)
- DefaultDependencies=no
- Requires=systemd-udev-settle.service
- After=systemd-udev-settle.service
-diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
-index c097e3852..e7b1d8862 100644
---- a/etc/systemd/system/zfs-import-scan.service.in
-+++ b/etc/systemd/system/zfs-import-scan.service.in
-@@ -1,5 +1,6 @@
- [Unit]
- Description=Import ZFS pools by device scanning
-+Documentation=man:zpool(8)
- DefaultDependencies=no
- Requires=systemd-udev-settle.service
- After=systemd-udev-settle.service
-diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mount.service.in
-index 728fc630c..8a73716f5 100644
---- a/etc/systemd/system/zfs-mount.service.in
-+++ b/etc/systemd/system/zfs-mount.service.in
-@@ -1,5 +1,6 @@
- [Unit]
- Description=Mount ZFS filesystems
-+Documentation=man:zfs(8)
- DefaultDependencies=no
- After=systemd-udev-settle.service
- After=zfs-import.target
-diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in
-index 494f5cbef..d0c93a3e6 100644
---- a/etc/systemd/system/zfs-share.service.in
-+++ b/etc/systemd/system/zfs-share.service.in
-@@ -1,5 +1,6 @@
- [Unit]
- Description=ZFS file system shares
-+Documentation=man:zfs(8)
- After=nfs-server.service nfs-kernel-server.service
- After=smb.service
- After=zfs-mount.service
diff --git a/zfs/debian/patches/0008-increase-default-zcmd-allocation-to-256K.patch b/zfs/debian/patches/0004-increase-default-zcmd-allocation-to-256K.patch
similarity index 97%
rename from zfs/debian/patches/0008-increase-default-zcmd-allocation-to-256K.patch
rename to zfs/debian/patches/0004-increase-default-zcmd-allocation-to-256K.patch
index bb1f7cb..a260280 100644
--- a/zfs/debian/patches/0008-increase-default-zcmd-allocation-to-256K.patch
+++ b/zfs/debian/patches/0004-increase-default-zcmd-allocation-to-256K.patch
@@ -61,10 +61,10 @@ Signed-off-by: Colin Ian King <colin.king at canonical.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c
-index 9703f844f..0cfcf9c2f 100644
+index 19bb57ad4..2a069ffe6 100644
 --- a/lib/libzfs/libzfs_util.c
 +++ b/lib/libzfs/libzfs_util.c
-@@ -1355,7 +1355,7 @@ int
+@@ -1134,7 +1134,7 @@ int
  zcmd_alloc_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc, size_t len)
  {
  	if (len == 0)
diff --git a/zfs/debian/patches/0009-import-with-d-dev-disk-by-id-in-scan-service.patch b/zfs/debian/patches/0005-import-with-d-dev-disk-by-id-in-scan-service.patch
similarity index 91%
rename from zfs/debian/patches/0009-import-with-d-dev-disk-by-id-in-scan-service.patch
rename to zfs/debian/patches/0005-import-with-d-dev-disk-by-id-in-scan-service.patch
index d6b0e23..5075b8b 100644
--- a/zfs/debian/patches/0009-import-with-d-dev-disk-by-id-in-scan-service.patch
+++ b/zfs/debian/patches/0005-import-with-d-dev-disk-by-id-in-scan-service.patch
@@ -13,10 +13,10 @@ Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in
-index e7b1d8862..060540f63 100644
+index 4aae9f06e..ec5c45e63 100644
 --- a/etc/systemd/system/zfs-import-scan.service.in
 +++ b/etc/systemd/system/zfs-import-scan.service.in
-@@ -12,7 +12,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
+@@ -11,7 +11,7 @@ ConditionPathExists=!@sysconfdir@/zfs/zpool.cache
  [Service]
  Type=oneshot
  RemainAfterExit=yes
diff --git a/zfs/debian/patches/0011-Enable-zed-emails.patch b/zfs/debian/patches/0006-Enable-zed-emails.patch
similarity index 96%
rename from zfs/debian/patches/0011-Enable-zed-emails.patch
rename to zfs/debian/patches/0006-Enable-zed-emails.patch
index d1c7537..ed40ff1 100644
--- a/zfs/debian/patches/0011-Enable-zed-emails.patch
+++ b/zfs/debian/patches/0006-Enable-zed-emails.patch
@@ -11,7 +11,7 @@ behavior of mdadm.
  1 file changed, 2 insertions(+), 2 deletions(-)
 
 diff --git a/cmd/zed/zed.d/zed.rc b/cmd/zed/zed.d/zed.rc
-index 35a4d1275..c6c106b06 100644
+index 0ef706849..50632bfcb 100644
 --- a/cmd/zed/zed.d/zed.rc
 +++ b/cmd/zed/zed.d/zed.rc
 @@ -15,7 +15,7 @@
diff --git a/zfs/debian/patches/0006-Use-python3-for-arcstat.py-arc_summary.py-dbufstat.p.patch b/zfs/debian/patches/0006-Use-python3-for-arcstat.py-arc_summary.py-dbufstat.p.patch
deleted file mode 100644
index 9ec3e7e..0000000
--- a/zfs/debian/patches/0006-Use-python3-for-arcstat.py-arc_summary.py-dbufstat.p.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Colin Ian King <colin.king at canonical.com>
-Date: Mon, 17 Oct 2016 14:30:56 +0800
-Subject: [PATCH] Use python3 for arcstat.py, arc_summary.py & dbufstat.py
-
----
- cmd/arc_summary/arc_summary.py | 2 +-
- cmd/arcstat/arcstat.py         | 2 +-
- cmd/dbufstat/dbufstat.py       | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/cmd/arc_summary/arc_summary.py b/cmd/arc_summary/arc_summary.py
-index f6dbb9bfb..723c2e5a6 100755
---- a/cmd/arc_summary/arc_summary.py
-+++ b/cmd/arc_summary/arc_summary.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- #
- # $Id: arc_summary.pl,v 388:e27800740aa2 2011-07-08 02:53:29Z jhell $
- #
-diff --git a/cmd/arcstat/arcstat.py b/cmd/arcstat/arcstat.py
-index d7d3e9b73..3a7a47d67 100755
---- a/cmd/arcstat/arcstat.py
-+++ b/cmd/arcstat/arcstat.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- #
- # Print out ZFS ARC Statistics exported via kstat(1)
- # For a definition of fields, or usage, use arctstat.pl -v
-diff --git a/cmd/dbufstat/dbufstat.py b/cmd/dbufstat/dbufstat.py
-index 42bb0c7c7..73e02ca11 100755
---- a/cmd/dbufstat/dbufstat.py
-+++ b/cmd/dbufstat/dbufstat.py
-@@ -1,4 +1,4 @@
--#!/usr/bin/python
-+#!/usr/bin/python3
- #
- # Print out statistics for all cached dmu buffers.  This information
- # is available through the dbufs kstat and may be post-processed as
diff --git a/zfs/debian/patches/0010-Fix-deadlock-between-zfs-umount-snapentry_expire.patch b/zfs/debian/patches/0010-Fix-deadlock-between-zfs-umount-snapentry_expire.patch
deleted file mode 100644
index 711571a..0000000
--- a/zfs/debian/patches/0010-Fix-deadlock-between-zfs-umount-snapentry_expire.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Rohan Puri <rohan.puri15 at gmail.com>
-Date: Sat, 28 Jul 2018 18:32:12 +0530
-Subject: [PATCH] Fix deadlock between zfs umount & snapentry_expire
-
-zfs umount -> zfsctl_destroy() takes the zfs_snapshot_lock as a
-writer and calls zfsctl_snapshot_unmount_cancel(), which waits
-for snapentry_expire() if present (when snap is automounted).
-This snapentry_expire() itself then waits for zfs_snapshot_lock
-as a reader, resulting in a deadlock.
-
-The fix is to only hold the zfs_snapshot_lock over the tree
-lookup and removal.  After a successful lookup the lock can
-be dropped and zfs_snapentry_t will remain valid until the
-reference taken by the lookup is released.
-
-Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
-Signed-off-by: Rohan Puri <rohan.puri15 at gmail.com>
-Closes #7751
-Closes #7752
-
-(Cherry-picked from fd7265c646f40e364396af5014bbb83e809e124a)
-Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
-
-Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
----
- module/zfs/zfs_ctldir.c | 11 +++++------
- 1 file changed, 5 insertions(+), 6 deletions(-)
-
-diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c
-index bf5a1d059..2964b65a6 100644
---- a/module/zfs/zfs_ctldir.c
-+++ b/module/zfs/zfs_ctldir.c
-@@ -358,8 +358,6 @@ snapentry_expire(void *data)
- static void
- zfsctl_snapshot_unmount_cancel(zfs_snapentry_t *se)
- {
--	ASSERT(RW_LOCK_HELD(&zfs_snapshot_lock));
--
- 	if (taskq_cancel_id(system_delay_taskq, se->se_taskqid) == 0) {
- 		se->se_taskqid = TASKQID_INVALID;
- 		zfsctl_snapshot_rele(se);
-@@ -570,13 +568,14 @@ zfsctl_destroy(zfsvfs_t *zfsvfs)
- 		uint64_t objsetid = dmu_objset_id(zfsvfs->z_os);
- 
- 		rw_enter(&zfs_snapshot_lock, RW_WRITER);
--		if ((se = zfsctl_snapshot_find_by_objsetid(spa, objsetid))
--		    != NULL) {
--			zfsctl_snapshot_unmount_cancel(se);
-+		se = zfsctl_snapshot_find_by_objsetid(spa, objsetid);
-+		if (se != NULL)
- 			zfsctl_snapshot_remove(se);
-+		rw_exit(&zfs_snapshot_lock);
-+		if (se != NULL) {
-+			zfsctl_snapshot_unmount_cancel(se);
- 			zfsctl_snapshot_rele(se);
- 		}
--		rw_exit(&zfs_snapshot_lock);
- 	} else if (zfsvfs->z_ctldir) {
- 		iput(zfsvfs->z_ctldir);
- 		zfsvfs->z_ctldir = NULL;
diff --git a/zfs/debian/patches/series b/zfs/debian/patches/series
index ab9bf4e..66bda31 100644
--- a/zfs/debian/patches/series
+++ b/zfs/debian/patches/series
@@ -1,10 +1,6 @@
 0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
-0002-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch
-0003-add-man-page-reference-to-systemd-units.patch
-0004-always-load-ZFS-module-on-boot.patch
-0006-Use-python3-for-arcstat.py-arc_summary.py-dbufstat.p.patch
-0007-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
-0008-increase-default-zcmd-allocation-to-256K.patch
-0009-import-with-d-dev-disk-by-id-in-scan-service.patch
-0010-Fix-deadlock-between-zfs-umount-snapentry_expire.patch
-0011-Enable-zed-emails.patch
+0002-always-load-ZFS-module-on-boot.patch
+0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
+0004-increase-default-zcmd-allocation-to-256K.patch
+0005-import-with-d-dev-disk-by-id-in-scan-service.patch
+0006-Enable-zed-emails.patch
-- 
2.11.0





More information about the pve-devel mailing list