rebase patches on top of zfs-0.8.0

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

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
Stoiko Ivanov 2019-05-23 23:11:30 +02:00 committed by Thomas Lamprecht
parent d56eab879e
commit e4f11a69e8
11 changed files with 15 additions and 218 deletions

View File

@ -9,7 +9,7 @@ Subject: [PATCH] Check-for-META-and-DCH-consistency-in-autoconf
1 file changed, 29 insertions(+), 5 deletions(-) 1 file changed, 29 insertions(+), 5 deletions(-)
diff --git a/config/zfs-meta.m4 b/config/zfs-meta.m4 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 --- a/config/zfs-meta.m4
+++ b/config/zfs-meta.m4 +++ b/config/zfs-meta.m4
@@ -1,9 +1,10 @@ @@ -1,9 +1,10 @@
@ -35,7 +35,7 @@ index 3e1429d99..b8e26c492 100644
ZFS_META_NAME=_ZFS_AC_META_GETVAL([(Name|Project|Package)]); ZFS_META_NAME=_ZFS_AC_META_GETVAL([(Name|Project|Package)]);
if test -n "$ZFS_META_NAME"; then 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]) AC_SUBST([ZFS_META_VERSION])
fi fi

View File

@ -1,37 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Debian ZFS on Linux maintainers
<pkg-zfsonlinux-devel@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

View File

@ -11,11 +11,11 @@ they ship their own zfs-zed unit.
1 file changed, 1 insertion(+), 1 deletion(-) 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 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 --- a/etc/systemd/system/zfs-zed.service.in
+++ b/etc/systemd/system/zfs-zed.service.in +++ b/etc/systemd/system/zfs-zed.service.in
@@ -5,7 +5,7 @@ After=zfs-import-cache.service @@ -3,7 +3,7 @@ Description=ZFS Event Daemon (zed)
After=zfs-import-scan.service Documentation=man:zed(8)
[Service] [Service]
-ExecStart=@sbindir@/zed -F -ExecStart=@sbindir@/zed -F

View File

@ -1,60 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@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@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

View File

@ -61,10 +61,10 @@ Signed-off-by: Colin Ian King <colin.king@canonical.com>
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libzfs/libzfs_util.c b/lib/libzfs/libzfs_util.c 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 --- a/lib/libzfs/libzfs_util.c
+++ b/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) zcmd_alloc_dst_nvlist(libzfs_handle_t *hdl, zfs_cmd_t *zc, size_t len)
{ {
if (len == 0) if (len == 0)

View File

@ -13,10 +13,10 @@ Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
1 file changed, 1 insertion(+), 1 deletion(-) 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 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 --- a/etc/systemd/system/zfs-import-scan.service.in
+++ b/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] [Service]
Type=oneshot Type=oneshot
RemainAfterExit=yes RemainAfterExit=yes

View File

@ -11,7 +11,7 @@ behavior of mdadm.
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmd/zed/zed.d/zed.rc b/cmd/zed/zed.d/zed.rc 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 --- a/cmd/zed/zed.d/zed.rc
+++ b/cmd/zed/zed.d/zed.rc +++ b/cmd/zed/zed.d/zed.rc
@@ -15,7 +15,7 @@ @@ -15,7 +15,7 @@

View File

@ -1,41 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Colin Ian King <colin.king@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

View File

@ -1,61 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Rohan Puri <rohan.puri15@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@llnl.gov>
Signed-off-by: Rohan Puri <rohan.puri15@gmail.com>
Closes #7751
Closes #7752
(Cherry-picked from fd7265c646f40e364396af5014bbb83e809e124a)
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@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;

View File

@ -1,10 +1,6 @@
0001-Check-for-META-and-DCH-consistency-in-autoconf.patch 0001-Check-for-META-and-DCH-consistency-in-autoconf.patch
0002-Add-libuutil-to-LIBADD-for-libzfs-and-libzfs_core.patch 0002-always-load-ZFS-module-on-boot.patch
0003-add-man-page-reference-to-systemd-units.patch 0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
0004-always-load-ZFS-module-on-boot.patch 0004-increase-default-zcmd-allocation-to-256K.patch
0006-Use-python3-for-arcstat.py-arc_summary.py-dbufstat.p.patch 0005-import-with-d-dev-disk-by-id-in-scan-service.patch
0007-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch 0006-Enable-zed-emails.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