mostly drop patches we already applied intermittently

Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com>
---
did some minimal testing:
* running ztest on a VM
* having a few containers with replication setup and migrating one of them
* creating a PBS-backup of a VM and then again (to verify that incremental
  dirty-bitmap backups work)
all as expected.

Reading through ZFS issues on github (after running the tests) I noticed:
https://github.com/openzfs/zfs/issues/14413
so would potentially wait until this is is resolved until shipping this
While our current 6.1 kernel is not affected by:
https://github.com/openzfs/zfs/pull/14415
depending on ubuntu ports and picks this might become relevant as well.


...o-the-zed-binary-on-the-systemd-unit.patch |   4 +-
 ...itramfs-Fix-legacy-mountpoint-rootfs.patch |  58 --------
 ...dd-workaround-for-broken-Linux-pipes.patch |  68 ---------
 ...ssion-checks-for-extended-attributes.patch |  91 ------------
 ...Linux-6.1-compat-open-inside-tmpfile.patch | 137 ------------------
 debian/patches/series                         |   4 -
 upstream                                      |   2 +-
 7 files changed, 3 insertions(+), 361 deletions(-)
 delete mode 100644 
debian/patches/0012-initramfs-Fix-legacy-mountpoint-rootfs.patch
 delete mode 100644 
debian/patches/0013-Add-workaround-for-broken-Linux-pipes.patch
 delete mode 100644 
debian/patches/0014-skip-permission-checks-for-extended-attributes.patch
 delete mode 100644 
debian/patches/0015-Linux-6.1-compat-open-inside-tmpfile.patch

diff --git 
a/debian/patches/0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch 
b/debian/patches/0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
index ebc1850b..b1f78182 100644
--- 
a/debian/patches/0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
+++ 
b/debian/patches/0003-Fix-the-path-to-the-zed-binary-on-the-systemd-unit.patch
@@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
  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 008075138..570e27707 100644
+index be80025a4..20ce8e632 100644
 --- a/etc/systemd/system/zfs-zed.service.in
 +++ b/etc/systemd/system/zfs-zed.service.in
 @@ -4,7 +4,7 @@ Documentation=man:zed(8)
@@ -22,6 +22,6 @@ index 008075138..570e27707 100644
  [Service]
 -ExecStart=@sbindir@/zed -F
 +ExecStart=/usr/sbin/zed -F
- Restart=on-abort
+ Restart=always
  
  [Install]
diff --git a/debian/patches/0012-initramfs-Fix-legacy-mountpoint-rootfs.patch 
b/debian/patches/0012-initramfs-Fix-legacy-mountpoint-rootfs.patch
deleted file mode 100644
index e26941d2..00000000
--- a/debian/patches/0012-initramfs-Fix-legacy-mountpoint-rootfs.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Ryan Moeller <r...@ixsystems.com>
-Date: Mon, 12 Dec 2022 13:23:06 -0500
-Subject: [PATCH] initramfs: Fix legacy mountpoint rootfs
-
-Legacy mountpoint datasets should not pass `-o zfsutil` to `mount.zfs`.
-Fix the logic in `mount_fs()` to not forget we have a legacy mountpoint
-when checking for an `org.zol:mountpoint` userprop.
-
-Reviewed-by: Richard Yao <r...@gentoo.org>
-Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov>
-Signed-off-by: Ryan Moeller <r...@ixsystems.com>
-Closes #14274
-(cherry picked from commit 786ff6a6cb33226b4f4292c7569b9093286f74d9)
-(cherry picked from commit f28c7302cb77a8cb6112690d0eed0bf4adeeae15)
-Signed-off-by: Stoiko Ivanov <s.iva...@proxmox.com>
----
- contrib/initramfs/scripts/zfs | 20 ++++++++------------
- 1 file changed, 8 insertions(+), 12 deletions(-)
-
-diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs
-index 9169adf5f..c7548fa07 100644
---- a/contrib/initramfs/scripts/zfs
-+++ b/contrib/initramfs/scripts/zfs
-@@ -331,25 +331,21 @@ mount_fs()
-               # Can't use the mountpoint property. Might be one of our
-               # clones. Check the 'org.zol:mountpoint' property set in
-               # clone_snap() if that's usable.
--              mountpoint=$(get_fs_value "$fs" org.zol:mountpoint)
--              if [ "$mountpoint" = "legacy" ] ||
--                 [ "$mountpoint" = "none" ] ||
--                 [ "$mountpoint" = "-" ]
-+              mountpoint1=$(get_fs_value "$fs" org.zol:mountpoint)
-+              if [ "$mountpoint1" = "legacy" ] ||
-+                 [ "$mountpoint1" = "none" ] ||
-+                 [ "$mountpoint1" = "-" ]
-               then
-                       if [ "$fs" != "${ZFS_BOOTFS}" ]; then
-                               # We don't have a proper mountpoint and this
-                               # isn't the root fs.
-                               return 0
--                      else
--                              # Last hail-mary: Hope 'rootmnt' is set!
--                              mountpoint=""
-                       fi
--              fi
--
--              # If it's not a legacy filesystem, it can only be a
--              # native one...
--              if [ "$mountpoint" = "legacy" ]; then
-                       ZFS_CMD="mount.zfs"
-+                      # Last hail-mary: Hope 'rootmnt' is set!
-+                      mountpoint=""
-+              else
-+                      mountpoint="$mountpoint1"
-               fi
-       fi
- 
diff --git a/debian/patches/0013-Add-workaround-for-broken-Linux-pipes.patch 
b/debian/patches/0013-Add-workaround-for-broken-Linux-pipes.patch
deleted file mode 100644
index ce4d75cd..00000000
--- a/debian/patches/0013-Add-workaround-for-broken-Linux-pipes.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Rich Ercolani <214141+rincebr...@users.noreply.github.com>
-Date: Mon, 9 May 2022 19:33:55 -0400
-Subject: [PATCH] Add workaround for broken Linux pipes
-
-Linux has an unresolved hang if you resize a pipe with bytes
-in it.
-
-Since there's no obvious way to detect this happening, added a
-workaround to disable resizing the pipe buffer if you set an
-environment variable.
-
-Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov>
-Signed-off-by: Rich Ercolani <rincebr...@gmail.com>
-Closes #13309
-(cherry picked from commit e84a2ed7a8b9e6458c25c6e93a93601eaf4128eb)
-Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
----
- lib/libzfs/os/linux/libzfs_sendrecv_os.c | 16 ++++++++++++++++
- man/man8/zfs.8                           |  8 ++++++++
- 2 files changed, 24 insertions(+)
-
-diff --git a/lib/libzfs/os/linux/libzfs_sendrecv_os.c 
b/lib/libzfs/os/linux/libzfs_sendrecv_os.c
-index ac7ab95a3..8fc02fff2 100644
---- a/lib/libzfs/os/linux/libzfs_sendrecv_os.c
-+++ b/lib/libzfs/os/linux/libzfs_sendrecv_os.c
-@@ -35,6 +35,22 @@
- void
- libzfs_set_pipe_max(int infd)
- {
-+#if __linux__
-+      /*
-+       * Sadly, Linux has an unfixed deadlock if you do SETPIPE_SZ on a pipe
-+       * with data in it.
-+       * cf. #13232, https://bugzilla.kernel.org/show_bug.cgi?id=212295
-+       *
-+       * And since the problem is in waking up the writer, there's nothing
-+       * we can do about it from here.
-+       *
-+       * So if people want to, they can set this, but they
-+       * may regret it...
-+       */
-+      if (getenv("ZFS_SET_PIPE_MAX") == NULL)
-+              return;
-+#endif
-+
-       FILE *procf = fopen("/proc/sys/fs/pipe-max-size", "re");
- 
-       if (procf != NULL) {
-diff --git a/man/man8/zfs.8 b/man/man8/zfs.8
-index fca1ba00d..a5c944169 100644
---- a/man/man8/zfs.8
-+++ b/man/man8/zfs.8
-@@ -713,6 +713,14 @@ to use
- to mount ZFS datasets.
- This option is provided for backwards compatibility with older ZFS versions.
- .El
-+.Bl -tag -width "ZFS_SET_PIPE_MAX"
-+.It Sy ZFS_SET_PIPE_MAX
-+Tells
-+.Nm zfs
-+to set the maximum pipe size for sends/recieves.
-+Disabled by default on Linux
-+due to an unfixed deadlock in Linux's pipe size handling code.
-+.El
- .
- .Sh INTERFACE STABILITY
- .Sy Committed .
diff --git 
a/debian/patches/0014-skip-permission-checks-for-extended-attributes.patch 
b/debian/patches/0014-skip-permission-checks-for-extended-attributes.patch
deleted file mode 100644
index 0b5f6cd9..00000000
--- a/debian/patches/0014-skip-permission-checks-for-extended-attributes.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Ameer Hamza <aha...@ixsystems.com>
-Date: Wed, 23 Nov 2022 01:28:13 +0500
-Subject: [PATCH] skip permission checks for extended attributes
-
-zfs_zaccess_trivial() calls the generic_permission() to read
-xattr attributes. This causes deadlock if called from
-zpl_xattr_set_dir() context as xattr and the dent locks are
-already held in this scenario. This commit skips the permissions
-checks for extended attributes since the Linux VFS stack already
-checks it before passing us the control.
-
-Signed-off-by: Ameer Hamza <aha...@ixsystems.com>
-(cherry picked from commit 75fbe7eb99c3d20403c79c7e24a97997c424313a)
-Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
----
- module/os/linux/zfs/zfs_dir.c                                | 3 ---
- module/os/linux/zfs/zfs_vnops_os.c                           | 3 ++-
- module/os/linux/zfs/zpl_xattr.c                              | 2 +-
- tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh | 3 +++
- 4 files changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/module/os/linux/zfs/zfs_dir.c b/module/os/linux/zfs/zfs_dir.c
-index 82b32d1cc..8ad5454b5 100644
---- a/module/os/linux/zfs/zfs_dir.c
-+++ b/module/os/linux/zfs/zfs_dir.c
-@@ -1066,9 +1066,6 @@ zfs_make_xattrdir(znode_t *zp, vattr_t *vap, znode_t 
**xzpp, cred_t *cr)
- 
-       *xzpp = NULL;
- 
--      if ((error = zfs_zaccess(zp, ACE_WRITE_NAMED_ATTRS, 0, B_FALSE, cr)))
--              return (error);
--
-       if ((error = zfs_acl_ids_create(zp, IS_XATTR, vap, cr, NULL,
-           &acl_ids)) != 0)
-               return (error);
-diff --git a/module/os/linux/zfs/zfs_vnops_os.c 
b/module/os/linux/zfs/zfs_vnops_os.c
-index 796a86c25..ae0401e60 100644
---- a/module/os/linux/zfs/zfs_vnops_os.c
-+++ b/module/os/linux/zfs/zfs_vnops_os.c
-@@ -579,6 +579,7 @@ zfs_create(znode_t *dzp, char *name, vattr_t *vap, int 
excl,
-       boolean_t       fuid_dirtied;
-       boolean_t       have_acl = B_FALSE;
-       boolean_t       waited = B_FALSE;
-+      boolean_t       skip_acl = (flag & ATTR_NOACLCHECK) ? B_TRUE : B_FALSE;
- 
-       /*
-        * If we have an ephemeral id, ACL, or XVATTR then
-@@ -651,7 +652,7 @@ top:
-                * Create a new file object and update the directory
-                * to reference it.
-                */
--              if ((error = zfs_zaccess(dzp, ACE_ADD_FILE, 0, B_FALSE, cr))) {
-+              if ((error = zfs_zaccess(dzp, ACE_ADD_FILE, 0, skip_acl, cr))) {
-                       if (have_acl)
-                               zfs_acl_ids_free(&acl_ids);
-                       goto out;
-diff --git a/module/os/linux/zfs/zpl_xattr.c b/module/os/linux/zfs/zpl_xattr.c
-index bd5d5803f..9d758d2d0 100644
---- a/module/os/linux/zfs/zpl_xattr.c
-+++ b/module/os/linux/zfs/zpl_xattr.c
-@@ -496,7 +496,7 @@ zpl_xattr_set_dir(struct inode *ip, const char *name, 
const void *value,
-               vap->va_gid = crgetgid(cr);
- 
-               error = -zfs_create(dxzp, (char *)name, vap, 0, 0644, &xzp,
--                  cr, 0, NULL);
-+                  cr, ATTR_NOACLCHECK, NULL);
-               if (error)
-                       goto out;
-       }
-diff --git a/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh 
b/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh
-index 6c6b592fb..8aa2cf496 100755
---- a/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh
-+++ b/tests/zfs-tests/tests/functional/acl/posix/posix_004_pos.ksh
-@@ -35,6 +35,7 @@
- # STRATEGY:
- #     1. Prepare an appropriate ACL on the test directory
- #     2. Change the owner of the directory
-+#     3. Reset and set the ACLs for test directory owned by the user
- #
- 
- verify_runnable "both"
-@@ -44,6 +45,8 @@ log_must setfacl -d -m u:$ZFS_ACL_STAFF1:rwx $TESTDIR
- log_must setfacl -b $TESTDIR
- 
- log_must chown $ZFS_ACL_STAFF1 $TESTDIR
-+log_must setfacl -b $TESTDIR
-+log_must setfacl -d -m u:$ZFS_ACL_STAFF1:rwx $TESTDIR
- log_must chown 0 $TESTDIR
- 
- log_pass "chown works with POSIX ACLs"
diff --git a/debian/patches/0015-Linux-6.1-compat-open-inside-tmpfile.patch 
b/debian/patches/0015-Linux-6.1-compat-open-inside-tmpfile.patch
deleted file mode 100644
index 778e7912..00000000
--- a/debian/patches/0015-Linux-6.1-compat-open-inside-tmpfile.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Antonio Russo <aeru...@aerusso.net>
-Date: Sat, 31 Dec 2022 07:51:32 -0700
-Subject: [PATCH] Linux 6.1 compat: open inside tmpfile()
-
-Linux 863f144 modified the .tmpfile interface to pass a struct file,
-rather than a struct dentry, and expect the tmpfile implementation to
-open inside of tmpfile().
-
-This patch implements a configuration test that checks for this new API
-and appropriately sets a HAVE_TMPFILE_DENTRY flag that tracks this old
-API.  Contingent on this flag, the appropriate API is implemented.
-
-Reviewed-by: Richard Yao <richard....@alumni.stonybrook.edu>
-Reviewed-by: Brian Behlendorf <behlendo...@llnl.gov>
-Signed-off-by: Antonio Russo <aeru...@aerusso.net>
-Closes #14301
-Closes #14343
-(cherry picked from commit d27c81847b43584483b5509ff352e7e727b0ce87)
-Signed-off-by: Thomas Lamprecht <t.lampre...@proxmox.com>
----
- config/kernel-tmpfile.m4        | 32 +++++++++++++++++++++++++++-----
- module/os/linux/zfs/zpl_inode.c | 15 +++++++++++++++
- 2 files changed, 42 insertions(+), 5 deletions(-)
-
-diff --git a/config/kernel-tmpfile.m4 b/config/kernel-tmpfile.m4
-index 45c2e6cee..acb7ea1e8 100644
---- a/config/kernel-tmpfile.m4
-+++ b/config/kernel-tmpfile.m4
-@@ -3,11 +3,25 @@ dnl # 3.11 API change
- dnl # Add support for i_op->tmpfile
- dnl #
- AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
-+      dnl #
-+      dnl # 6.1 API change
-+      dnl # use struct file instead of struct dentry
-+      dnl #
-+      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
-+              #include <linux/fs.h>
-+              int tmpfile(struct user_namespace *userns,
-+                  struct inode *inode, struct file *file,
-+                  umode_t mode) { return 0; }
-+              static struct inode_operations
-+                  iops __attribute__ ((unused)) = {
-+                      .tmpfile = tmpfile,
-+              };
-+      ],[])
-       dnl #
-       dnl # 5.11 API change
-       dnl # add support for userns parameter to tmpfile
-       dnl #
--      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_userns], [
-+      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [
-               #include <linux/fs.h>
-               int tmpfile(struct user_namespace *userns,
-                   struct inode *inode, struct dentry *dentry,
-@@ -17,7 +31,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
-                       .tmpfile = tmpfile,
-               };
-       ],[])
--      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
-+      ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [
-                       #include <linux/fs.h>
-                       int tmpfile(struct inode *inode, struct dentry *dentry,
-                           umode_t mode) { return 0; }
-@@ -30,16 +44,24 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
- 
- AC_DEFUN([ZFS_AC_KERNEL_TMPFILE], [
-       AC_MSG_CHECKING([whether i_op->tmpfile() exists])
--      ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_userns], [
-+      ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
-               AC_MSG_RESULT(yes)
-               AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
-               AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has userns])
-       ],[
--              ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile], [
-+              ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry_userns], 
[
-                       AC_MSG_RESULT(yes)
-                       AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() exists])
-+                      AC_DEFINE(HAVE_TMPFILE_USERNS, 1, [i_op->tmpfile() has 
userns])
-+                      AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, [i_op->tmpfile() uses 
old dentry signature])
-               ],[
--                      AC_MSG_RESULT(no)
-+                      
ZFS_LINUX_TEST_RESULT([inode_operations_tmpfile_dentry], [
-+                              AC_MSG_RESULT(yes)
-+                              AC_DEFINE(HAVE_TMPFILE, 1, [i_op->tmpfile() 
exists])
-+                              AC_DEFINE(HAVE_TMPFILE_DENTRY, 1, 
[i_op->tmpfile() uses old dentry signature])
-+                      ],[
-+                              AC_MSG_RESULT(no)
-+                      ])
-               ])
-       ])
- ])
-diff --git a/module/os/linux/zfs/zpl_inode.c b/module/os/linux/zfs/zpl_inode.c
-index a0615af8d..fece7886e 100644
---- a/module/os/linux/zfs/zpl_inode.c
-+++ b/module/os/linux/zfs/zpl_inode.c
-@@ -224,12 +224,17 @@ zpl_mknod(struct inode *dir, struct dentry *dentry, 
umode_t mode,
- 
- #ifdef HAVE_TMPFILE
- static int
-+#ifndef HAVE_TMPFILE_DENTRY
-+zpl_tmpfile(struct user_namespace *userns, struct inode *dir,
-+    struct file *file, umode_t mode)
-+#else
- #ifdef HAVE_TMPFILE_USERNS
- zpl_tmpfile(struct user_namespace *userns, struct inode *dir,
-     struct dentry *dentry, umode_t mode)
- #else
- zpl_tmpfile(struct inode *dir, struct dentry *dentry, umode_t mode)
- #endif
-+#endif
- {
-       cred_t *cr = CRED();
-       struct inode *ip;
-@@ -252,11 +257,21 @@ zpl_tmpfile(struct inode *dir, struct dentry *dentry, 
umode_t mode)
-       if (error == 0) {
-               /* d_tmpfile will do drop_nlink, so we should set it first */
-               set_nlink(ip, 1);
-+#ifndef HAVE_TMPFILE_DENTRY
-+              d_tmpfile(file, ip);
-+
-+              error = zpl_xattr_security_init(ip, dir,
-+                  &file->f_path.dentry->d_name);
-+#else
-               d_tmpfile(dentry, ip);
- 
-               error = zpl_xattr_security_init(ip, dir, &dentry->d_name);
-+#endif
-               if (error == 0)
-                       error = zpl_init_acl(ip, dir);
-+#ifndef HAVE_TMPFILE_DENTRY
-+              error = finish_open_simple(file, error);
-+#endif
-               /*
-                * don't need to handle error here, file is already in
-                * unlinked set.
diff --git a/debian/patches/series b/debian/patches/series
index 4032f1ee..d2770d39 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,7 +9,3 @@
 0009-Patch-move-manpage-arcstat-1-to-arcstat-8.patch
 0010-arcstat-Fix-integer-division-with-python3.patch
 0011-arc-stat-summary-guard-access-to-l2arc-MFU-MRU-stats.patch
-0012-initramfs-Fix-legacy-mountpoint-rootfs.patch
-0013-Add-workaround-for-broken-Linux-pipes.patch
-0014-skip-permission-checks-for-extended-attributes.patch
-0015-Linux-6.1-compat-open-inside-tmpfile.patch
diff --git a/upstream b/upstream
index 21bd7661..04b02785 160000
--- a/upstream
+++ b/upstream
@@ -1 +1 @@
-Subproject commit 21bd7661334cd865d17934bebbcaf8d3356279ee
+Subproject commit 04b02785b67f9b976c43643dd52ce6cdbc22e11e
-- 
2.30.2



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to