From 097f9f19a0b16c9fc04409c3077bc3382de96ded Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 5 Sep 2021 09:48:57 +0200 Subject: [PATCH] Update Debian packaging for 2.1.0 abigail 1.8 and newer is incompatible with the *.abi files shipped by upstream with zfs 2.1.0. It must be downgraded to an older version. buster shipped with abigail 1.5, which works fine, whereas bullseye ships with 1.8. This will probably be resolved with 2.1.1. See here for details: https://github.com/openzfs/zfs/issues/12360 Several manpages were renamed, added or removed. Their copyright entries are updated herein but many other copyright entries seem out of date and require updating as well. Signed-off-by: Lukas Wunner --- debian/changelog | 6 + debian/control | 2 +- debian/copyright | 24 +- ...move-iov_iter_advance-for-iter_write.patch | 43 - ..._progress-never-calling-set_progress.patch | 40 - ...bal_var-fix-endianness-handling-fixe.patch | 37 - ...nclosure_sysfs_path-enclosure-suppor.patch | 332 ----- ...ry-to-call-vdev_op_hold-or-vdev_op_r.patch | 50 - ...6-Linux-increase-max-nvlist_src-size.patch | 46 - ...road-locking-in-spa_vdev_config_exit.patch | 36 - ...ialize-on-FAULTED-non-writeable-vdev.patch | 258 ---- ...-heap-allocation-for-zvol_request_sy.patch | 220 ---- ...bomb-out-when-using-keylocation-file.patch | 46 - debian/patches/2100-zfs-load-module.patch | 6 +- ...s-vol-wait-fix-locked-encrypted-vols.patch | 4 +- debian/patches/move-arcstat-1-to-8.patch | 1088 +---------------- debian/patches/series | 10 - debian/zfs-dkms.install | 2 + debian/zfsutils-linux.install | 14 +- 19 files changed, 64 insertions(+), 2200 deletions(-) delete mode 100644 debian/patches/0001-Remove-iov_iter_advance-for-iter_write.patch delete mode 100644 debian/patches/0010-Fix-report_mount_progress-never-calling-set_progress.patch delete mode 100644 debian/patches/0014-libzpool-set_global_var-fix-endianness-handling-fixe.patch delete mode 100644 debian/patches/0019-Better-zfs_get_enclosure_sysfs_path-enclosure-suppor.patch delete mode 100644 debian/patches/0020-vdev_ops-don-t-try-to-call-vdev_op_hold-or-vdev_op_r.patch delete mode 100644 debian/patches/0026-Linux-increase-max-nvlist_src-size.patch delete mode 100644 debian/patches/0028-Fix-overly-broad-locking-in-spa_vdev_config_exit.patch delete mode 100644 debian/patches/0035-Cancel-TRIM-initialize-on-FAULTED-non-writeable-vdev.patch delete mode 100644 debian/patches/0037-linux-zvol-avoid-heap-allocation-for-zvol_request_sy.patch delete mode 100644 debian/patches/0038-Don-t-bomb-out-when-using-keylocation-file.patch diff --git a/debian/changelog b/debian/changelog index f7cfb985728d..a9f9a8fac391 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +zfs-linux (2.1.0-1) UNRELEASED; urgency=medium + + * New upstream version 2.1.0 + + -- Lukas Wunner Mon, 23 Aug 2021 23:10:55 +0200 + zfs-linux (2.0.3-9) unstable; urgency=medium * Cherry-pick "Remove iov_iter_advance() for iter_write" (Closes: #989373) diff --git a/debian/control b/debian/control index 46ba568fcdbc..f23d5c1057bf 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: Debian ZFS on Linux maintainers , Carlos Alberto Lopez Perez , Mo Zhou -Build-Depends: abigail-tools, +Build-Depends: abigail-tools (<< 1.8), debhelper-compat (= 12), dh-python, dkms (>> 2.1.1.2-5), diff --git a/debian/copyright b/debian/copyright index 02e8c48d941e..cdfeb190927c 100644 --- a/debian/copyright +++ b/debian/copyright @@ -398,18 +398,32 @@ Copyright: 2009, Oracle and/or its affiliates. 2009, Michael Gebetsroither License: CDDL-1.0 -Files: man/man5/zfs-events.5 - man/man5/zfs-module-parameters.5 +Files: man/man4/spl.4 Copyright: 2013, Turbo Fredriksson License: CDDL-1.0 -Files: man/man5/zpool-features.5 +Files: man/man4/zfs.4 +Copyright: 2013, Turbo Fredriksson + 2019, 2021, Delphix + 2019, Datto Inc. +License: CDDL-1.0 + +Files: man/man7/zpool-features.7 Copyright: 2013, Delphix 2013, Saso Kiselkov 2014, Joyent, Inc. License: CDDL-1.0 +Files: man/man8/zpool-events.8 +Copyright: 2007, Sun Microsystems, Inc. + 2012, 2018, Delphix + 2012, Cyril Plisko + 2017, Datto Inc. + 2018, George Melikov + 2017, Nexenta Systems, Inc. + 2017, Open-E, Inc. + Files: man/man8/zdb.8 Copyright: 2012, Richard Lowe. 2012, Delphix @@ -426,10 +440,6 @@ Copyright: 2007, Sun Microsystems, Inc. 2013, Delphix License: CDDL-1.0 -Files: man/man8/zstreamdump.8 -Copyright: 2009, Sun Microsystems, Inc. -License: CDDL-1.0 - Files: module/* Copyright: 2011-2014, Delphix. 2007, 2009, 2010, Sun Microsystems, Inc. diff --git a/debian/patches/0001-Remove-iov_iter_advance-for-iter_write.patch b/debian/patches/0001-Remove-iov_iter_advance-for-iter_write.patch deleted file mode 100644 index e0b7f970e96a..000000000000 --- a/debian/patches/0001-Remove-iov_iter_advance-for-iter_write.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 412b69dfabe223a69159c8579ba808b49f0982e0 Mon Sep 17 00:00:00 2001 -From: Rich Ercolani -Date: Tue, 1 Jun 2021 14:58:08 -0400 -Subject: [PATCH] Remove iov_iter_advance() for iter_write - -The additional iter advance is incorrect, as copy_from_iter() has -already done the right thing. This will result in the following -warning being printed to the console as of the 5.12 kernel. - - Attempted to advance past end of bvec iter - -This change should have been included with #11378 when a -similar change was made on the read side. - -Suggested-by: @siebenmann -Reviewed-by: Brian Behlendorf -Signed-off-by: Rich Ercolani -Issue #11378 -Closes #12041 -Closes #12155 -(cherry picked from commit 3f81aba7668143c6ca6fc44983d4c880606dea8f) -Signed-off-by: Jonathon Fernyhough ---- - module/os/linux/zfs/zpl_file.c | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/module/os/linux/zfs/zpl_file.c b/module/os/linux/zfs/zpl_file.c -index 08bf97ff3..e20c1dd41 100644 ---- a/module/os/linux/zfs/zpl_file.c -+++ b/module/os/linux/zfs/zpl_file.c -@@ -342,9 +342,6 @@ zpl_iter_write(struct kiocb *kiocb, struct iov_iter *from) - ssize_t wrote = count - uio.uio_resid; - kiocb->ki_pos += wrote; - -- if (wrote > 0) -- iov_iter_advance(from, wrote); -- - return (wrote); - } - --- -2.32.0.rc2 - diff --git a/debian/patches/0010-Fix-report_mount_progress-never-calling-set_progress.patch b/debian/patches/0010-Fix-report_mount_progress-never-calling-set_progress.patch deleted file mode 100644 index feae290db4f8..000000000000 --- a/debian/patches/0010-Fix-report_mount_progress-never-calling-set_progress.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 778869fa139ab72ed557e7455e4f1126684f2625 Mon Sep 17 00:00:00 2001 -From: Andriy Gapon -Date: Thu, 18 Feb 2021 23:53:05 +0200 -Subject: [PATCH 10/38] Fix report_mount_progress never calling - set_progress_header - -That happens because of an off-by-one mistake. -share_mount_one_cb() calls report_mount_progress(current=sm_done) after -having incremented sm_done by one. Then report_mount_progress() -increments the parameter again. It appears that that logic became -obsolete after commit a10d50f999511, parallel zfs mount. - -On FreeBSD I observe that zfs mount -a -v prints, for example, - (null): (201/248) -That happens because set_progress_header() is never called. - -With this change the output becomes correct: - Mounting ZFS filesystems: (209/248) - -Reviewed-by: Brian Behlendorf -Signed-off-by: Andriy Gapon -Closes #11607 ---- - cmd/zfs/zfs_main.c | 3 --- - 1 file changed, 3 deletions(-) - -Index: zfs/cmd/zfs/zfs_main.c -=================================================================== ---- zfs.orig/cmd/zfs/zfs_main.c -+++ zfs/cmd/zfs/zfs_main.c -@@ -6790,9 +6790,6 @@ report_mount_progress(int current, int t - time_t now = time(NULL); - char info[32]; - -- /* report 1..n instead of 0..n-1 */ -- ++current; -- - /* display header if we're here for the first time */ - if (current == 1) { - set_progress_header(gettext("Mounting ZFS filesystems")); diff --git a/debian/patches/0014-libzpool-set_global_var-fix-endianness-handling-fixe.patch b/debian/patches/0014-libzpool-set_global_var-fix-endianness-handling-fixe.patch deleted file mode 100644 index 44951c183274..000000000000 --- a/debian/patches/0014-libzpool-set_global_var-fix-endianness-handling-fixe.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b5fffa1d294f5e17e8e4fdf34a4fec99c374c586 Mon Sep 17 00:00:00 2001 -From: Christian Schwarz -Date: Mon, 15 Feb 2021 13:02:32 +0100 -Subject: [PATCH 14/38] libzpool: set_global_var: fix endianness handling - (fixes zdb -o ) - -Without this patch I get the error - - Setting global variables is only supported on little-endian systems - -when using `zdb -o` on my amd64 machine. - -Reviewed-by: Matthew Ahrens -Reviewed-by: Brian Behlendorf -Reviewed-by: Pavel Zakharov -Signed-off-by: Christian Schwarz -Closes #11602 ---- - lib/libzpool/util.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/libzpool/util.c b/lib/libzpool/util.c -index ebfaa9b41..13d585299 100644 ---- a/lib/libzpool/util.c -+++ b/lib/libzpool/util.c -@@ -159,7 +159,7 @@ set_global_var(char *arg) - char *varname = arg, *varval; - u_longlong_t val; - --#ifndef _LITTLE_ENDIAN -+#ifndef _ZFS_LITTLE_ENDIAN - /* - * On big endian systems changing a 64-bit variable would set the high - * 32 bits instead of the low 32 bits, which could cause unexpected --- -2.30.1 - diff --git a/debian/patches/0019-Better-zfs_get_enclosure_sysfs_path-enclosure-suppor.patch b/debian/patches/0019-Better-zfs_get_enclosure_sysfs_path-enclosure-suppor.patch deleted file mode 100644 index 87d79be3c981..000000000000 --- a/debian/patches/0019-Better-zfs_get_enclosure_sysfs_path-enclosure-suppor.patch +++ /dev/null @@ -1,332 +0,0 @@ -From 7e56b05058c8d2af2b5bc8b0b1475d9fdd6cd7dc Mon Sep 17 00:00:00 2001 -From: Tony Hutter -Date: Sat, 20 Feb 2021 20:17:45 -0800 -Subject: [PATCH 19/38] Better zfs_get_enclosure_sysfs_path() enclosure support - -A multpathed disk will have several 'underlying' paths to the disk. For -example, multipath disk 'dm-0' may be made up of paths: -/dev/{sda,sdb,sdc,sdd}. On many enclosures those underlying sysfs -paths will have a symlink back to their enclosure device entry -(like 'enclosure_device0/slot1'). This is used by the -statechange-led.sh script to set/clear the fault LED for a disk, and -by 'zpool status -c'. - -However, on some enclosures, those underlying paths may not all have -symlinks back to the enclosure device. Maybe only two out of four -of them might. - -This patch updates zfs_get_enclosure_sysfs_path() to favor returning -paths that have symlinks back to their enclosure devices, rather -than just returning the first path. - -Reviewed-by: Brian Behlendorf -Signed-off-by: Tony Hutter -Closes #11617 ---- - lib/libzutil/os/linux/zutil_device_path_os.c | 252 +++++++++++-------- - 1 file changed, 142 insertions(+), 110 deletions(-) - -diff --git a/lib/libzutil/os/linux/zutil_device_path_os.c b/lib/libzutil/os/linux/zutil_device_path_os.c -index 36331fd72..1f767bb7a 100644 ---- a/lib/libzutil/os/linux/zutil_device_path_os.c -+++ b/lib/libzutil/os/linux/zutil_device_path_os.c -@@ -154,15 +154,124 @@ zfs_strip_path(char *path) - return (strrchr(path, '/') + 1); - } - -+/* -+ * Given a dev name like "sda", return the full enclosure sysfs path to -+ * the disk. You can also pass in the name with "/dev" prepended -+ * to it (like /dev/sda). -+ * -+ * For example, disk "sda" in enclosure slot 1: -+ * dev: "sda" -+ * returns: "/sys/class/enclosure/1:0:3:0/Slot 1" -+ * -+ * 'dev' must be a non-devicemapper device. -+ * -+ * Returned string must be freed. -+ */ -+char * -+zfs_get_enclosure_sysfs_path(const char *dev_name) -+{ -+ DIR *dp = NULL; -+ struct dirent *ep; -+ char buf[MAXPATHLEN]; -+ char *tmp1 = NULL; -+ char *tmp2 = NULL; -+ char *tmp3 = NULL; -+ char *path = NULL; -+ size_t size; -+ int tmpsize; -+ -+ if (dev_name == NULL) -+ return (NULL); -+ -+ /* If they preface 'dev' with a path (like "/dev") then strip it off */ -+ tmp1 = strrchr(dev_name, '/'); -+ if (tmp1 != NULL) -+ dev_name = tmp1 + 1; /* +1 since we want the chr after '/' */ -+ -+ tmpsize = asprintf(&tmp1, "/sys/block/%s/device", dev_name); -+ if (tmpsize == -1 || tmp1 == NULL) { -+ tmp1 = NULL; -+ goto end; -+ } -+ -+ dp = opendir(tmp1); -+ if (dp == NULL) { -+ tmp1 = NULL; /* To make free() at the end a NOP */ -+ goto end; -+ } -+ -+ /* -+ * Look though all sysfs entries in /sys/block//device for -+ * the enclosure symlink. -+ */ -+ while ((ep = readdir(dp))) { -+ /* Ignore everything that's not our enclosure_device link */ -+ if (strstr(ep->d_name, "enclosure_device") == NULL) -+ continue; -+ -+ if (asprintf(&tmp2, "%s/%s", tmp1, ep->d_name) == -1 || -+ tmp2 == NULL) -+ break; -+ -+ size = readlink(tmp2, buf, sizeof (buf)); -+ -+ /* Did readlink fail or crop the link name? */ -+ if (size == -1 || size >= sizeof (buf)) { -+ free(tmp2); -+ tmp2 = NULL; /* To make free() at the end a NOP */ -+ break; -+ } -+ -+ /* -+ * We got a valid link. readlink() doesn't terminate strings -+ * so we have to do it. -+ */ -+ buf[size] = '\0'; -+ -+ /* -+ * Our link will look like: -+ * -+ * "../../../../port-11:1:2/..STUFF../enclosure/1:0:3:0/SLOT 1" -+ * -+ * We want to grab the "enclosure/1:0:3:0/SLOT 1" part -+ */ -+ tmp3 = strstr(buf, "enclosure"); -+ if (tmp3 == NULL) -+ break; -+ -+ if (asprintf(&path, "/sys/class/%s", tmp3) == -1) { -+ /* If asprintf() fails, 'path' is undefined */ -+ path = NULL; -+ break; -+ } -+ -+ if (path == NULL) -+ break; -+ } -+ -+end: -+ free(tmp2); -+ free(tmp1); -+ -+ if (dp != NULL) -+ closedir(dp); -+ -+ return (path); -+} -+ - /* - * Allocate and return the underlying device name for a device mapper device. -- * If a device mapper device maps to multiple devices, return the first device. - * - * For example, dm_name = "/dev/dm-0" could return "/dev/sda". Symlinks to a - * DM device (like /dev/disk/by-vdev/A0) are also allowed. - * -- * Returns device name, or NULL on error or no match. If dm_name is not a DM -- * device then return NULL. -+ * If the DM device has multiple underlying devices (like with multipath -+ * DM devices), then favor underlying devices that have a symlink back to their -+ * back to their enclosure device in sysfs. This will be useful for the -+ * zedlet scripts that toggle the fault LED. -+ * -+ * Returns an underlying device name, or NULL on error or no match. If dm_name -+ * is not a DM device then return NULL. - * - * NOTE: The returned name string must be *freed*. - */ -@@ -176,6 +285,8 @@ dm_get_underlying_path(const char *dm_name) - char *path = NULL; - char *dev_str; - int size; -+ char *first_path = NULL; -+ char *enclosure_path; - - if (dm_name == NULL) - return (NULL); -@@ -204,13 +315,27 @@ dm_get_underlying_path(const char *dm_name) - goto end; - - /* -- * Return first entry (that isn't itself a directory) in the -- * directory containing device-mapper dependent (underlying) -- * devices. -+ * A device-mapper device can have multiple paths to it (multipath). -+ * Favor paths that have a symlink back to their enclosure device. -+ * We have to do this since some enclosures may only provide a symlink -+ * back for one underlying path to a disk and not the other. -+ * -+ * If no paths have links back to their enclosure, then just return the -+ * first path. - */ - while ((ep = readdir(dp))) { - if (ep->d_type != DT_DIR) { /* skip "." and ".." dirs */ -+ if (!first_path) -+ first_path = strdup(ep->d_name); -+ -+ enclosure_path = -+ zfs_get_enclosure_sysfs_path(ep->d_name); -+ -+ if (!enclosure_path) -+ continue; -+ - size = asprintf(&path, "/dev/%s", ep->d_name); -+ free(enclosure_path); - break; - } - } -@@ -220,6 +345,17 @@ end: - closedir(dp); - free(tmp); - free(realp); -+ -+ if (!path) { -+ /* -+ * None of the underlying paths had a link back to their -+ * enclosure devices. Throw up out hands and return the first -+ * underlying path. -+ */ -+ size = asprintf(&path, "/dev/%s", first_path); -+ } -+ -+ free(first_path); - return (path); - } - -@@ -331,110 +467,6 @@ zfs_get_underlying_path(const char *dev_name) - return (name); - } - --/* -- * Given a dev name like "sda", return the full enclosure sysfs path to -- * the disk. You can also pass in the name with "/dev" prepended -- * to it (like /dev/sda). -- * -- * For example, disk "sda" in enclosure slot 1: -- * dev: "sda" -- * returns: "/sys/class/enclosure/1:0:3:0/Slot 1" -- * -- * 'dev' must be a non-devicemapper device. -- * -- * Returned string must be freed. -- */ --char * --zfs_get_enclosure_sysfs_path(const char *dev_name) --{ -- DIR *dp = NULL; -- struct dirent *ep; -- char buf[MAXPATHLEN]; -- char *tmp1 = NULL; -- char *tmp2 = NULL; -- char *tmp3 = NULL; -- char *path = NULL; -- size_t size; -- int tmpsize; -- -- if (dev_name == NULL) -- return (NULL); -- -- /* If they preface 'dev' with a path (like "/dev") then strip it off */ -- tmp1 = strrchr(dev_name, '/'); -- if (tmp1 != NULL) -- dev_name = tmp1 + 1; /* +1 since we want the chr after '/' */ -- -- tmpsize = asprintf(&tmp1, "/sys/block/%s/device", dev_name); -- if (tmpsize == -1 || tmp1 == NULL) { -- tmp1 = NULL; -- goto end; -- } -- -- dp = opendir(tmp1); -- if (dp == NULL) { -- tmp1 = NULL; /* To make free() at the end a NOP */ -- goto end; -- } -- -- /* -- * Look though all sysfs entries in /sys/block//device for -- * the enclosure symlink. -- */ -- while ((ep = readdir(dp))) { -- /* Ignore everything that's not our enclosure_device link */ -- if (strstr(ep->d_name, "enclosure_device") == NULL) -- continue; -- -- if (asprintf(&tmp2, "%s/%s", tmp1, ep->d_name) == -1 || -- tmp2 == NULL) -- break; -- -- size = readlink(tmp2, buf, sizeof (buf)); -- -- /* Did readlink fail or crop the link name? */ -- if (size == -1 || size >= sizeof (buf)) { -- free(tmp2); -- tmp2 = NULL; /* To make free() at the end a NOP */ -- break; -- } -- -- /* -- * We got a valid link. readlink() doesn't terminate strings -- * so we have to do it. -- */ -- buf[size] = '\0'; -- -- /* -- * Our link will look like: -- * -- * "../../../../port-11:1:2/..STUFF../enclosure/1:0:3:0/SLOT 1" -- * -- * We want to grab the "enclosure/1:0:3:0/SLOT 1" part -- */ -- tmp3 = strstr(buf, "enclosure"); -- if (tmp3 == NULL) -- break; -- -- if (asprintf(&path, "/sys/class/%s", tmp3) == -1) { -- /* If asprintf() fails, 'path' is undefined */ -- path = NULL; -- break; -- } -- -- if (path == NULL) -- break; -- } -- --end: -- free(tmp2); -- free(tmp1); -- -- if (dp != NULL) -- closedir(dp); -- -- return (path); --} - - #ifdef HAVE_LIBUDEV - --- -2.30.1 - diff --git a/debian/patches/0020-vdev_ops-don-t-try-to-call-vdev_op_hold-or-vdev_op_r.patch b/debian/patches/0020-vdev_ops-don-t-try-to-call-vdev_op_hold-or-vdev_op_r.patch deleted file mode 100644 index 63445e2a3ca6..000000000000 --- a/debian/patches/0020-vdev_ops-don-t-try-to-call-vdev_op_hold-or-vdev_op_r.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 11f2e9a491baa2ae3fc00f6b8b892fa91a852ca1 Mon Sep 17 00:00:00 2001 -From: fbynite <52733326+fbynite@users.noreply.github.com> -Date: Sat, 20 Feb 2021 19:19:20 -0900 -Subject: [PATCH 20/38] vdev_ops: don't try to call vdev_op_hold or - vdev_op_rele when NULL - -This prevents a panic after a SLOG add/removal on the root pool followed -by a zpool scrub. - -When a SLOG is removed, a hole takes its place - the vdev_ops for a hole -is vdev_hole_ops, which defines the handler functions of vdev_op_hold -and vdev_op_rele as NULL. - -This bug has been reported in illumos and FreeBSD, a different trigger -in the FreeBSD report though. - -Credit for this patch goes to Patrick Mooney - -Obtained from: illumos-gate commit: c65bd18728f34725 -External-issue: https://www.illumos.org/issues/12981 -External-issue: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252396 -Reviewed-by: Brian Behlendorf -Signed-off-by: Rob Wing -Closes #11623 ---- - module/zfs/vdev.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: zfs/module/zfs/vdev.c -=================================================================== ---- zfs.orig/module/zfs/vdev.c -+++ zfs/module/zfs/vdev.c -@@ -2317,7 +2317,7 @@ vdev_hold(vdev_t *vd) - for (int c = 0; c < vd->vdev_children; c++) - vdev_hold(vd->vdev_child[c]); - -- if (vd->vdev_ops->vdev_op_leaf) -+ if (vd->vdev_ops->vdev_op_leaf && vd->vdev_ops->vdev_op_hold != NULL) - vd->vdev_ops->vdev_op_hold(vd); - } - -@@ -2328,7 +2328,7 @@ vdev_rele(vdev_t *vd) - for (int c = 0; c < vd->vdev_children; c++) - vdev_rele(vd->vdev_child[c]); - -- if (vd->vdev_ops->vdev_op_leaf) -+ if (vd->vdev_ops->vdev_op_leaf && vd->vdev_ops->vdev_op_rele != NULL) - vd->vdev_ops->vdev_op_rele(vd); - } - diff --git a/debian/patches/0026-Linux-increase-max-nvlist_src-size.patch b/debian/patches/0026-Linux-increase-max-nvlist_src-size.patch deleted file mode 100644 index e094cadc43b1..000000000000 --- a/debian/patches/0026-Linux-increase-max-nvlist_src-size.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 1dfc82a14ed538992f5c37a152995e93ede10469 Mon Sep 17 00:00:00 2001 -From: Brian Behlendorf -Date: Wed, 24 Feb 2021 09:57:18 -0800 -Subject: [PATCH 26/38] Linux: increase max nvlist_src size - -On Linux increase the maximum allowed size of the src nvlist which -can be passed to the /dev/zfs ioctl. Originally, this was set -to a maximum of KMALLOC_MAX_SIZE (4M) because it was kmalloc'd. -Since that time it's been converted to a vmalloc so that's no -longer a hard limit, and it's desirable for `zfs send/recv` to -allow larger nvlists so more snapshots can be sent at once. - -Signed-off-by: Brian Behlendorf -Closes #6572 -Closes #11638 ---- - man/man5/zfs-module-parameters.5 | 2 +- - module/os/linux/zfs/zfs_ioctl_os.c | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -Index: zfs/man/man5/zfs-module-parameters.5 -=================================================================== ---- zfs.orig/man/man5/zfs-module-parameters.5 -+++ zfs/man/man5/zfs-module-parameters.5 -@@ -1186,7 +1186,7 @@ amount of memory. When the limit is exce - description of the error is sent to the zfs-dbgmsg log. This parameter should - not need to be touched under normal circumstances. On FreeBSD, the default is - based on the system limit on user wired memory. On Linux, the default is --\fBKMALLOC_MAX_SIZE\fR . -+\fB128MB\fR. - .sp - Default value: \fB0\fR (kernel decides) - .RE -Index: zfs/module/os/linux/zfs/zfs_ioctl_os.c -=================================================================== ---- zfs.orig/module/os/linux/zfs/zfs_ioctl_os.c -+++ zfs/module/os/linux/zfs/zfs_ioctl_os.c -@@ -209,7 +209,7 @@ zfs_max_nvlist_src_size_os(void) - if (zfs_max_nvlist_src_size != 0) - return (zfs_max_nvlist_src_size); - -- return (KMALLOC_MAX_SIZE); -+ return (MIN(ptob(zfs_totalram_pages) / 4, 128 * 1024 * 1024)); - } - - void diff --git a/debian/patches/0028-Fix-overly-broad-locking-in-spa_vdev_config_exit.patch b/debian/patches/0028-Fix-overly-broad-locking-in-spa_vdev_config_exit.patch deleted file mode 100644 index 555983e1012a..000000000000 --- a/debian/patches/0028-Fix-overly-broad-locking-in-spa_vdev_config_exit.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 75a089ed34befb8d11df9be92a4438cc49554bf6 Mon Sep 17 00:00:00 2001 -From: Brian Behlendorf -Date: Wed, 24 Feb 2021 10:00:21 -0800 -Subject: [PATCH 28/38] Fix overly broad locking in spa_vdev_config_exit() - -Calling vdev_free() only requires the we acquire the spa config -SCL_STATE_ALL locks, not the SCL_ALL locks. In particular, we need -need to avoid taking the SCL_CONFIG lock (included in SCL_ALL) as a -writer since this can lead to a deadlock. The txg_sync_thread() may -block in spa_txg_history_init_io() when taking the SCL_CONFIG lock -as a reading when it detects there's a pending writer. - -Reviewed-by: Igor Kozhukhov -Reviewed-by: Mark Maybee -Signed-off-by: Brian Behlendorf -Closes #11585 ---- - module/zfs/spa_misc.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -Index: zfs/module/zfs/spa_misc.c -=================================================================== ---- zfs.orig/module/zfs/spa_misc.c -+++ zfs/module/zfs/spa_misc.c -@@ -1274,9 +1274,9 @@ spa_vdev_config_exit(spa_t *spa, vdev_t - */ - vdev_autotrim_stop_wait(vd); - -- spa_config_enter(spa, SCL_ALL, spa, RW_WRITER); -+ spa_config_enter(spa, SCL_STATE_ALL, spa, RW_WRITER); - vdev_free(vd); -- spa_config_exit(spa, SCL_ALL, spa); -+ spa_config_exit(spa, SCL_STATE_ALL, spa); - } - - /* diff --git a/debian/patches/0035-Cancel-TRIM-initialize-on-FAULTED-non-writeable-vdev.patch b/debian/patches/0035-Cancel-TRIM-initialize-on-FAULTED-non-writeable-vdev.patch deleted file mode 100644 index ffaf966ea9a6..000000000000 --- a/debian/patches/0035-Cancel-TRIM-initialize-on-FAULTED-non-writeable-vdev.patch +++ /dev/null @@ -1,258 +0,0 @@ -From bedbc13daa6dfe9e0221bfadb8d8db2378deaacc Mon Sep 17 00:00:00 2001 -From: nssrikanth <75025422+nssrikanth@users.noreply.github.com> -Date: Tue, 2 Mar 2021 23:57:27 +0530 -Subject: [PATCH 35/38] Cancel TRIM / initialize on FAULTED non-writeable vdevs - -When a device which is actively trimming or initializing becomes -FAULTED, and therefore no longer writable, cancel the active -TRIM or initialization. When the device is merely taken offline -with `zpool offline` then stop the operation but do not cancel it. -When the device is brought back online the operation will be -resumed if possible. - -Reviewed-by: Brian Behlendorf -Co-authored-by: Brian Behlendorf -Co-authored-by: Vipin Kumar Verma -Signed-off-by: Srikanth N S -Closes #11588 ---- - module/zfs/vdev_initialize.c | 10 ++- - module/zfs/vdev_trim.c | 15 +++-- - tests/runfiles/common.run | 2 + - .../cli_root/zpool_initialize/Makefile.am | 1 + - ..._initialize_fault_export_import_online.ksh | 59 ++++++++++++++++++ - .../cli_root/zpool_trim/Makefile.am | 1 + - .../zpool_trim_fault_export_import_online.ksh | 62 +++++++++++++++++++ - 7 files changed, 144 insertions(+), 6 deletions(-) - create mode 100755 tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_fault_export_import_online.ksh - create mode 100755 tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_fault_export_import_online.ksh - -Index: zfs/module/zfs/vdev_initialize.c -=================================================================== ---- zfs.orig/module/zfs/vdev_initialize.c -+++ zfs/module/zfs/vdev_initialize.c -@@ -536,8 +536,14 @@ vdev_initialize_thread(void *arg) - vd->vdev_initialize_tree = NULL; - - mutex_enter(&vd->vdev_initialize_lock); -- if (!vd->vdev_initialize_exit_wanted && vdev_writeable(vd)) { -- vdev_initialize_change_state(vd, VDEV_INITIALIZE_COMPLETE); -+ if (!vd->vdev_initialize_exit_wanted) { -+ if (vdev_writeable(vd)) { -+ vdev_initialize_change_state(vd, -+ VDEV_INITIALIZE_COMPLETE); -+ } else if (vd->vdev_faulted) { -+ vdev_initialize_change_state(vd, -+ VDEV_INITIALIZE_CANCELED); -+ } - } - ASSERT(vd->vdev_initialize_thread != NULL || - vd->vdev_initialize_inflight == 0); -Index: zfs/module/zfs/vdev_trim.c -=================================================================== ---- zfs.orig/module/zfs/vdev_trim.c -+++ zfs/module/zfs/vdev_trim.c -@@ -22,6 +22,7 @@ - /* - * Copyright (c) 2016 by Delphix. All rights reserved. - * Copyright (c) 2019 by Lawrence Livermore National Security, LLC. -+ * Copyright (c) 2021 Hewlett Packard Enterprise Development LP - */ - - #include -@@ -911,10 +912,16 @@ vdev_trim_thread(void *arg) - range_tree_destroy(ta.trim_tree); - - mutex_enter(&vd->vdev_trim_lock); -- if (!vd->vdev_trim_exit_wanted && vdev_writeable(vd)) { -- vdev_trim_change_state(vd, VDEV_TRIM_COMPLETE, -- vd->vdev_trim_rate, vd->vdev_trim_partial, -- vd->vdev_trim_secure); -+ if (!vd->vdev_trim_exit_wanted) { -+ if (vdev_writeable(vd)) { -+ vdev_trim_change_state(vd, VDEV_TRIM_COMPLETE, -+ vd->vdev_trim_rate, vd->vdev_trim_partial, -+ vd->vdev_trim_secure); -+ } else if (vd->vdev_faulted) { -+ vdev_trim_change_state(vd, VDEV_TRIM_CANCELED, -+ vd->vdev_trim_rate, vd->vdev_trim_partial, -+ vd->vdev_trim_secure); -+ } - } - ASSERT(vd->vdev_trim_thread != NULL || vd->vdev_trim_inflight[0] == 0); - -Index: zfs/tests/runfiles/common.run -=================================================================== ---- zfs.orig/tests/runfiles/common.run -+++ zfs/tests/runfiles/common.run -@@ -410,6 +410,7 @@ tags = ['functional', 'cli_root', 'zpool - - [tests/functional/cli_root/zpool_initialize] - tests = ['zpool_initialize_attach_detach_add_remove', -+ 'zpool_initialize_fault_export_import_online', - 'zpool_initialize_import_export', - 'zpool_initialize_offline_export_import_online', - 'zpool_initialize_online_offline', -@@ -474,6 +475,7 @@ tags = ['functional', 'cli_root', 'zpool - - [tests/functional/cli_root/zpool_trim] - tests = ['zpool_trim_attach_detach_add_remove', -+ 'zpool_trim_fault_export_import_online', - 'zpool_trim_import_export', 'zpool_trim_multiple', 'zpool_trim_neg', - 'zpool_trim_offline_export_import_online', 'zpool_trim_online_offline', - 'zpool_trim_partial', 'zpool_trim_rate', 'zpool_trim_rate_neg', -Index: zfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am -=================================================================== ---- zfs.orig/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am -+++ zfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/Makefile.am -@@ -2,6 +2,7 @@ pkgdatadir = $(datadir)/@PACKAGE@/zfs-te - dist_pkgdata_SCRIPTS = \ - cleanup.ksh \ - zpool_initialize_attach_detach_add_remove.ksh \ -+ zpool_initialize_fault_export_import_online.ksh \ - zpool_initialize_import_export.ksh \ - zpool_initialize_offline_export_import_online.ksh \ - zpool_initialize_online_offline.ksh \ -Index: zfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_fault_export_import_online.ksh -=================================================================== ---- /dev/null -+++ zfs/tests/zfs-tests/tests/functional/cli_root/zpool_initialize/zpool_initialize_fault_export_import_online.ksh -@@ -0,0 +1,59 @@ -+#!/bin/ksh -p -+# -+# CDDL HEADER START -+# -+# This file and its contents are supplied under the terms of the -+# Common Development and Distribution License ("CDDL"), version 1.0. -+# You may only use this file in accordance with the terms of version -+# 1.0 of the CDDL. -+# -+# A full copy of the text of the CDDL should have accompanied this -+# source. A copy of the CDDL is also available via the Internet at -+# http://www.illumos.org/license/CDDL. -+# -+# CDDL HEADER END -+# -+ -+# -+# Copyright (c) 2021 Lawrence Livermore National Security, LLC. -+# -+ -+. $STF_SUITE/include/libtest.shlib -+. $STF_SUITE/tests/functional/cli_root/zpool_initialize/zpool_initialize.kshlib -+ -+# -+# DESCRIPTION: -+# Miscellaneous complex sequences of operations function as expected. -+# -+# STRATEGY: -+# 1. Create a pool with a two-way mirror. -+# 2. Start initializing, fault, export, import, online and verify along -+# the way that the initializing was cancelled and not restarted. -+# -+ -+DISK1="$(echo $DISKS | cut -d' ' -f1)" -+DISK2="$(echo $DISKS | cut -d' ' -f2)" -+ -+log_must zpool create -f $TESTPOOL mirror $DISK1 $DISK2 -+ -+log_must zpool initialize $TESTPOOL $DISK1 -+progress="$(initialize_progress $TESTPOOL $DISK1)" -+[[ -z "$progress" ]] && log_fail "Initializing did not start" -+ -+log_must zpool offline -f $TESTPOOL $DISK1 -+log_must check_vdev_state $TESTPOOL $DISK1 "FAULTED" -+log_must eval "zpool status -i $TESTPOOL | grep $DISK1 | grep uninitialized" -+ -+log_must zpool export $TESTPOOL -+log_must zpool import $TESTPOOL -+ -+log_must check_vdev_state $TESTPOOL $DISK1 "FAULTED" -+log_must eval "zpool status -i $TESTPOOL | grep $DISK1 | grep uninitialized" -+ -+log_must zpool online $TESTPOOL $DISK1 -+log_must zpool clear $TESTPOOL $DISK1 -+log_must check_vdev_state $TESTPOOL $DISK1 "ONLINE" -+log_must eval "zpool status -i $TESTPOOL | grep $DISK1 | grep uninitialized" -+ -+log_pass "Initializing behaves as expected at each step of:" \ -+ "initialize + fault + export + import + online" -Index: zfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am -=================================================================== ---- zfs.orig/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am -+++ zfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/Makefile.am -@@ -3,6 +3,7 @@ dist_pkgdata_SCRIPTS = \ - setup.ksh \ - cleanup.ksh \ - zpool_trim_attach_detach_add_remove.ksh \ -+ zpool_trim_fault_export_import_online.ksh \ - zpool_trim_import_export.ksh \ - zpool_trim_multiple.ksh \ - zpool_trim_neg.ksh \ -Index: zfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_fault_export_import_online.ksh -=================================================================== ---- /dev/null -+++ zfs/tests/zfs-tests/tests/functional/cli_root/zpool_trim/zpool_trim_fault_export_import_online.ksh -@@ -0,0 +1,62 @@ -+#!/bin/ksh -p -+# -+# CDDL HEADER START -+# -+# This file and its contents are supplied under the terms of the -+# Common Development and Distribution License ("CDDL"), version 1.0. -+# You may only use this file in accordance with the terms of version -+# 1.0 of the CDDL. -+# -+# A full copy of the text of the CDDL should have accompanied this -+# source. A copy of the CDDL is also available via the Internet at -+# http://www.illumos.org/license/CDDL. -+# -+# CDDL HEADER END -+# -+ -+# -+# Copyright (c) 2019 by Tim Chase. All rights reserved. -+# Copyright (c) 2021 Lawrence Livermore National Security, LLC. -+# -+ -+. $STF_SUITE/include/libtest.shlib -+. $STF_SUITE/tests/functional/cli_root/zpool_trim/zpool_trim.kshlib -+ -+# -+# DESCRIPTION: -+# Miscellaneous complex sequences of operations function as expected. -+# -+# STRATEGY: -+# 1. Create a pool with a two-way mirror. -+# 2. Start trimming, fault, export, import, online and verify along -+# the way that the trim was cancelled and not restarted. -+# -+ -+DISK1="$(echo $DISKS | cut -d' ' -f1)" -+DISK2="$(echo $DISKS | cut -d' ' -f2)" -+ -+log_must zpool create -f $TESTPOOL mirror $DISK1 $DISK2 -+ -+log_must zpool trim -r 128M $TESTPOOL $DISK1 -+progress="$(trim_progress $TESTPOOL $DISK1)" -+[[ -z "$progress" ]] && log_fail "Trimming did not start" -+ -+log_must zpool offline -f $TESTPOOL $DISK1 -+log_must check_vdev_state $TESTPOOL $DISK1 "FAULTED" -+log_must eval "zpool status -t $TESTPOOL | grep $DISK1 | grep untrimmed" -+ -+log_must zpool export $TESTPOOL -+log_must zpool import $TESTPOOL -+ -+# Note: the expected state here is unsupported since the faulted device -+# cannot be checked to determine if it supports TRIM. -+log_must check_vdev_state $TESTPOOL $DISK1 "FAULTED" -+log_must eval "zpool status -t $TESTPOOL | grep $DISK1 | grep unsupported" -+ -+log_must zpool online $TESTPOOL $DISK1 -+log_must zpool clear $TESTPOOL $DISK1 -+log_must check_vdev_state $TESTPOOL $DISK1 "ONLINE" -+log_must eval "zpool status -t $TESTPOOL | grep $DISK1 | grep untrimmed" -+ -+log_pass "Trimming behaves as expected at each step of:" \ -+ "trim + fault + export + import + online" diff --git a/debian/patches/0037-linux-zvol-avoid-heap-allocation-for-zvol_request_sy.patch b/debian/patches/0037-linux-zvol-avoid-heap-allocation-for-zvol_request_sy.patch deleted file mode 100644 index c1c6004df5b5..000000000000 --- a/debian/patches/0037-linux-zvol-avoid-heap-allocation-for-zvol_request_sy.patch +++ /dev/null @@ -1,220 +0,0 @@ -From e439ee83c1316b58d480148c9c851f42c1458305 Mon Sep 17 00:00:00 2001 -From: Christian Schwarz -Date: Wed, 3 Mar 2021 17:15:28 +0100 -Subject: [PATCH 37/38] linux: zvol: avoid heap allocation for - zvol_request_sync=1 - -The spl_kmem_alloc showed up in some flamegraphs in a single-threaded -4k sync write workload at 85k IOPS on an -Intel(R) Xeon(R) Silver 4215 CPU @ 2.50GHz. -Certainly not a huge win but I believe the change is clean and -easy to maintain down the road. - -Reviewed-by: Brian Behlendorf -Reviewed-by: Matthew Ahrens -Signed-off-by: Christian Schwarz -Closes #11666 ---- - module/os/linux/zfs/zvol_os.c | 93 ++++++++++++++++++++++++----------- - 1 file changed, 64 insertions(+), 29 deletions(-) - -Index: zfs/module/os/linux/zfs/zvol_os.c -=================================================================== ---- zfs.orig/module/os/linux/zfs/zvol_os.c -+++ zfs/module/os/linux/zfs/zvol_os.c -@@ -56,12 +56,32 @@ struct zvol_state_os { - taskq_t *zvol_taskq; - static struct ida zvol_ida; - --typedef struct zv_request { -+typedef struct zv_request_stack { - zvol_state_t *zv; - struct bio *bio; -- taskq_ent_t ent; - } zv_request_t; - -+typedef struct zv_request_task { -+ zv_request_t zvr; -+ taskq_ent_t ent; -+} zv_request_task_t; -+ -+static zv_request_task_t * -+zv_request_task_create(zv_request_t zvr) -+{ -+ zv_request_task_t *task; -+ task = kmem_alloc(sizeof (zv_request_task_t), KM_SLEEP); -+ taskq_init_ent(&task->ent); -+ task->zvr = zvr; -+ return (task); -+} -+ -+static void -+zv_request_task_free(zv_request_task_t *task) -+{ -+ kmem_free(task, sizeof (*task)); -+} -+ - /* - * Given a path, return TRUE if path is a ZVOL. - */ -@@ -80,9 +100,8 @@ zvol_is_zvol_impl(const char *path) - } - - static void --zvol_write(void *arg) -+zvol_write(zv_request_t *zvr) - { -- zv_request_t *zvr = arg; - struct bio *bio = zvr->bio; - int error = 0; - uio_t uio; -@@ -102,7 +121,6 @@ zvol_write(void *arg) - if (uio.uio_resid == 0) { - rw_exit(&zv->zv_suspend_lock); - BIO_END_IO(bio, 0); -- kmem_free(zvr, sizeof (zv_request_t)); - return; - } - -@@ -162,13 +180,19 @@ zvol_write(void *arg) - blk_generic_end_io_acct(q, disk, WRITE, bio, start_time); - - BIO_END_IO(bio, -error); -- kmem_free(zvr, sizeof (zv_request_t)); - } - - static void --zvol_discard(void *arg) -+zvol_write_task(void *arg) -+{ -+ zv_request_task_t *task = arg; -+ zvol_write(&task->zvr); -+ zv_request_task_free(task); -+} -+ -+static void -+zvol_discard(zv_request_t *zvr) - { -- zv_request_t *zvr = arg; - struct bio *bio = zvr->bio; - zvol_state_t *zv = zvr->zv; - uint64_t start = BIO_BI_SECTOR(bio) << 9; -@@ -238,13 +262,19 @@ unlock: - blk_generic_end_io_acct(q, disk, WRITE, bio, start_time); - - BIO_END_IO(bio, -error); -- kmem_free(zvr, sizeof (zv_request_t)); - } - - static void --zvol_read(void *arg) -+zvol_discard_task(void *arg) -+{ -+ zv_request_task_t *task = arg; -+ zvol_discard(&task->zvr); -+ zv_request_task_free(task); -+} -+ -+static void -+zvol_read(zv_request_t *zvr) - { -- zv_request_t *zvr = arg; - struct bio *bio = zvr->bio; - int error = 0; - uio_t uio; -@@ -295,7 +325,14 @@ zvol_read(void *arg) - blk_generic_end_io_acct(q, disk, READ, bio, start_time); - - BIO_END_IO(bio, -error); -- kmem_free(zvr, sizeof (zv_request_t)); -+} -+ -+static void -+zvol_read_task(void *arg) -+{ -+ zv_request_task_t *task = arg; -+ zvol_read(&task->zvr); -+ zv_request_task_free(task); - } - - #ifdef HAVE_SUBMIT_BIO_IN_BLOCK_DEVICE_OPERATIONS -@@ -314,7 +351,6 @@ zvol_request(struct request_queue *q, st - uint64_t offset = BIO_BI_SECTOR(bio) << 9; - uint64_t size = BIO_BI_SIZE(bio); - int rw = bio_data_dir(bio); -- zv_request_t *zvr; - - if (bio_has_data(bio) && offset + size > zv->zv_volsize) { - printk(KERN_INFO -@@ -327,6 +363,12 @@ zvol_request(struct request_queue *q, st - goto out; - } - -+ zv_request_t zvr = { -+ .zv = zv, -+ .bio = bio, -+ }; -+ zv_request_task_t *task; -+ - if (rw == WRITE) { - if (unlikely(zv->zv_flags & ZVOL_RDONLY)) { - BIO_END_IO(bio, -SET_ERROR(EROFS)); -@@ -357,11 +399,6 @@ zvol_request(struct request_queue *q, st - rw_downgrade(&zv->zv_suspend_lock); - } - -- zvr = kmem_alloc(sizeof (zv_request_t), KM_SLEEP); -- zvr->zv = zv; -- zvr->bio = bio; -- taskq_init_ent(&zvr->ent); -- - /* - * We don't want this thread to be blocked waiting for i/o to - * complete, so we instead wait from a taskq callback. The -@@ -394,17 +431,19 @@ zvol_request(struct request_queue *q, st - */ - if (bio_is_discard(bio) || bio_is_secure_erase(bio)) { - if (zvol_request_sync) { -- zvol_discard(zvr); -+ zvol_discard(&zvr); - } else { -+ task = zv_request_task_create(zvr); - taskq_dispatch_ent(zvol_taskq, -- zvol_discard, zvr, 0, &zvr->ent); -+ zvol_discard_task, task, 0, &task->ent); - } - } else { - if (zvol_request_sync) { -- zvol_write(zvr); -+ zvol_write(&zvr); - } else { -+ task = zv_request_task_create(zvr); - taskq_dispatch_ent(zvol_taskq, -- zvol_write, zvr, 0, &zvr->ent); -+ zvol_write_task, task, 0, &task->ent); - } - } - } else { -@@ -418,19 +457,15 @@ zvol_request(struct request_queue *q, st - goto out; - } - -- zvr = kmem_alloc(sizeof (zv_request_t), KM_SLEEP); -- zvr->zv = zv; -- zvr->bio = bio; -- taskq_init_ent(&zvr->ent); -- - rw_enter(&zv->zv_suspend_lock, RW_READER); - - /* See comment in WRITE case above. */ - if (zvol_request_sync) { -- zvol_read(zvr); -+ zvol_read(&zvr); - } else { -+ task = zv_request_task_create(zvr); - taskq_dispatch_ent(zvol_taskq, -- zvol_read, zvr, 0, &zvr->ent); -+ zvol_read_task, task, 0, &task->ent); - } - } - diff --git a/debian/patches/0038-Don-t-bomb-out-when-using-keylocation-file.patch b/debian/patches/0038-Don-t-bomb-out-when-using-keylocation-file.patch deleted file mode 100644 index 86ed6ebfee88..000000000000 --- a/debian/patches/0038-Don-t-bomb-out-when-using-keylocation-file.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 92fb29b9f95522d1083f4467e9aab9f8f1e7d0ba Mon Sep 17 00:00:00 2001 -From: James Wah -Date: Thu, 4 Mar 2021 03:28:49 +1100 -Subject: [PATCH 38/38] Don't bomb out when using keylocation=file:// - -Avoid following the error path when the operation in fact succeeded. - -Reviewed-by: Ryan Moeller -Reviewed-by: Brian Behlendorf -Signed-off-by: James Wah -Closes #11651 ---- - lib/libzfs/libzfs_crypto.c | 10 +++++++--- - 1 file changed, 7 insertions(+), 3 deletions(-) - -diff --git a/lib/libzfs/libzfs_crypto.c b/lib/libzfs/libzfs_crypto.c -index 1a2ee638a..fe3a0f283 100644 ---- a/lib/libzfs/libzfs_crypto.c -+++ b/lib/libzfs/libzfs_crypto.c -@@ -532,6 +532,8 @@ get_key_material(libzfs_handle_t *hdl, boolean_t do_verify, boolean_t newkey, - - break; - case ZFS_KEYLOCATION_URI: -+ ret = ENOTSUP; -+ - for (handler = uri_handlers; handler->zuh_scheme != NULL; - handler++) { - if (strcmp(handler->zuh_scheme, uri_scheme) != 0) -@@ -544,9 +546,11 @@ get_key_material(libzfs_handle_t *hdl, boolean_t do_verify, boolean_t newkey, - break; - } - -- ret = ENOTSUP; -- zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, -- "URI scheme is not supported")); -+ if (ret == ENOTSUP) { -+ zfs_error_aux(hdl, dgettext(TEXT_DOMAIN, -+ "URI scheme is not supported")); -+ goto error; -+ } - - break; - default: --- -2.30.1 - diff --git a/debian/patches/2100-zfs-load-module.patch b/debian/patches/2100-zfs-load-module.patch index dd28a57a1877..95c8e93c34bb 100644 --- a/debian/patches/2100-zfs-load-module.patch +++ b/debian/patches/2100-zfs-load-module.patch @@ -69,6 +69,6 @@ Forward: no need if dracut_module_included "systemd"; then mkdir -p "${initdir}/$systemdsystemunitdir/zfs-import.target.wants" + dracut_install @systemdunitdir@/zfs-load-module.service - for _item in scan cache ; do - dracut_install @systemdunitdir@/zfs-import-$_item.service - if ! [ -L "${initdir}/$systemdsystemunitdir/zfs-import.target.wants"/zfs-import-$_item.service ]; then + for _service in "zfs-import-scan.service" "zfs-import-cache.service" ; do + dracut_install "@systemdunitdir@/$_service" + if ! [ -L "${initdir}/$systemdsystemunitdir/zfs-import.target.wants/$_service" ]; then diff --git a/debian/patches/4620-zfs-vol-wait-fix-locked-encrypted-vols.patch b/debian/patches/4620-zfs-vol-wait-fix-locked-encrypted-vols.patch index a2299c9cfda4..1dce7a3aea4f 100644 --- a/debian/patches/4620-zfs-vol-wait-fix-locked-encrypted-vols.patch +++ b/debian/patches/4620-zfs-vol-wait-fix-locked-encrypted-vols.patch @@ -30,8 +30,8 @@ Last-Update: 2020-07-22 while [ "$inner_loop" -lt 30 ]; do inner_loop=$((inner_loop + 1)) -- zvols="$(echo "$zvols" | filter_out_zvols_with_links)" -+ zvols="$(echo "$zvols" | filter_out_zvols_with_links | filter_out_locked_zvols)" +- zvols="$(filter_out_zvols_with_links)" ++ zvols="$(filter_out_zvols_with_links | filter_out_locked_zvols)" zvols_count=$(count_zvols) if [ "$zvols_count" -eq 0 ]; then diff --git a/debian/patches/move-arcstat-1-to-8.patch b/debian/patches/move-arcstat-1-to-8.patch index 0dbadf9b603c..b36e87efbd49 100644 --- a/debian/patches/move-arcstat-1-to-8.patch +++ b/debian/patches/move-arcstat-1-to-8.patch @@ -5,1067 +5,27 @@ Date: Fri Jan 15 14:26:42 2021 +0800 Move arcstat(1) to arcstat(8) to avoid conflict with binary package nordugrid-arc-client. We regenerate Makefile.in, so we don't have to modify them explicitly here. ---- a/man/man1/Makefile.am -+++ b/man/man1/Makefile.am -@@ -1,4 +1,4 @@ --dist_man_MANS = zhack.1 ztest.1 raidz_test.1 zvol_wait.1 arcstat.1 -+dist_man_MANS = zhack.1 ztest.1 raidz_test.1 zvol_wait.1 - EXTRA_DIST = cstyle.1 - - if BUILD_LINUX ---- a/man/man8/Makefile.am -+++ b/man/man8/Makefile.am -@@ -1,6 +1,7 @@ - include $(top_srcdir)/config/Substfiles.am - - dist_man_MANS = \ -+ arcstat.8 \ - fsck.zfs.8 \ - mount.zfs.8 \ - vdev_id.8 \ ---- a/man/man1/arcstat.1 -+++ /dev/null -@@ -1,520 +0,0 @@ --.\" --.\" This file and its contents are supplied under the terms of the --.\" Common Development and Distribution License ("CDDL"), version 1.0. --.\" You may only use this file in accordance with the terms of version --.\" 1.0 of the CDDL. --.\" --.\" A full copy of the text of the CDDL should have accompanied this --.\" source. A copy of the CDDL is also available via the Internet at --.\" http://www.illumos.org/license/CDDL. --.\" --.\" --.\" Copyright 2014 Adam Stevko. All rights reserved. --.\" Copyright (c) 2015 by Delphix. All rights reserved. --.\" Copyright (c) 2020 by AJ Jordan. All rights reserved. --.\" --.TH ARCSTAT 1 "Oct 20, 2020" OpenZFS --.SH NAME --arcstat \- report ZFS ARC and L2ARC statistics --.SH SYNOPSIS --.LP --.nf --\fBarcstat\fR [\fB-havxp\fR] [\fB-f field[,field]...\fR] [\fB-o file\fR] [\fB-s string\fR] [\fBinterval\fR [\fBcount\fR]] --.fi -- --.SH DESCRIPTION --.LP --The \fBarcstat\fR utility print various ZFS ARC and L2ARC statistics in --vmstat-like fashion. --.sp -- --.sp --.LP --The \fBarcstat\fR command reports the following information: --.sp --.ne 2 -- --.\" --.sp --.ne 1 --.na --\fBc \fR --.ad --.RS 14n --ARC target size --.RE -- --.sp --.ne 2 --.na --\fBdh% \fR --.ad --.RS 14n --Demand data hit percentage --.RE -- --.sp --.ne 2 --.na --\fBdm% \fR --.ad --.RS 14n --Demand data miss percentage --.RE -- --.sp --.ne 2 --.na --\fBmfu \fR --.ad --.RS 14n --MFU list hits per second --.RE -- --.sp --.ne 2 --.na --\fBmh% \fR --.ad --.RS 14n --Metadata hit percentage --.RE -- --.sp --.ne 2 --.na --\fBmm% \fR --.ad --.RS 14n --Metadata miss percentage --.RE -- --.sp --.ne 2 --.na --\fBmru \fR --.ad --.RS 14n --MRU list hits per second --.RE -- --.sp --.ne 2 --.na --\fBph% \fR --.ad --.RS 14n --Prefetch hits percentage --.RE -- --.sp --.ne 2 --.na --\fBpm% \fR --.ad --.RS 14n --Prefetch miss percentage --.RE -- --.sp --.ne 2 --.na --\fBdhit \fR --.ad --.RS 14n --Demand data hits per second --.RE -- --.sp --.ne 2 --.na --\fBdmis \fR --.ad --.RS 14n --Demand data misses per second --.RE -- --.sp --.ne 2 --.na --\fBhit% \fR --.ad --.RS 14n --ARC hit percentage --.RE -- --.sp --.ne 2 --.na --\fBhits \fR --.ad --.RS 14n --ARC reads per second --.RE -- --.sp --.ne 2 --.na --\fBmfug \fR --.ad --.RS 14n --MFU ghost list hits per second --.RE -- --.sp --.ne 2 --.na --\fBmhit \fR --.ad --.RS 14n --Metadata hits per second --.RE -- --.sp --.ne 2 --.na --\fBmiss \fR --.ad --.RS 14n --ARC misses per second --.RE -- --.sp --.ne 2 --.na --\fBmmis \fR --.ad --.RS 14n --Metadata misses per second --.RE -- --.sp --.ne 2 --.na --\fBmrug \fR --.ad --.RS 14n --MRU ghost list hits per second --.RE -- --.sp --.ne 2 --.na --\fBphit \fR --.ad --.RS 14n --Prefetch hits per second --.RE -- --.sp --.ne 2 --.na --\fBpmis \fR --.ad --.RS 14n --Prefetch misses per second --.RE -- --.sp --.ne 2 --.na --\fBread \fR --.ad --.RS 14n --Total ARC accesses per second --.RE -- --.sp --.ne 2 --.na --\fBtime \fR --.ad --.RS 14n --Time --.RE -- --.sp --.ne 2 --.na --\fBsize \fR --.ad --.RS 14n --ARC size --.RE -- --.sp --.ne 2 --.na --\fBarcsz \fR --.ad --.RS 14n --Alias for \fBsize\fR --.RE -- --.sp --.ne 2 --.na --\fBdread \fR --.ad --.RS 14n --Demand data accesses per second --.RE -- --.sp --.ne 2 --.na --\fBeskip \fR --.ad --.RS 14n --evict_skip per second --.RE -- --.sp --.ne 2 --.na --\fBmiss% \fR --.ad --.RS 14n --ARC miss percentage --.RE -- --.sp --.ne 2 --.na --\fBmread \fR --.ad --.RS 14n --Metadata accesses per second --.RE -- --.sp --.ne 2 --.na --\fBpread \fR --.ad --.RS 14n --Prefetch accesses per second --.RE -- --.sp --.ne 2 --.na --\fBl2hit% \fR --.ad --.RS 14n --L2ARC access hit percentage --.RE -- --.sp --.ne 2 --.na --\fBl2hits \fR --.ad --.RS 14n --L2ARC hits per second --.RE -- --.sp --.ne 2 --.na --\fBl2miss \fR --.ad --.RS 14n --L2ARC misses per second --.RE -- --.sp --.ne 2 --.na --\fBl2read \fR --.ad --.RS 14n --Total L2ARC accesses per second --.RE -- --.sp --.ne 2 --.na --\fBl2size \fR --.ad --.RS 14n --Size of the L2ARC --.RE -- --.sp --.ne 2 --.na --\fBmtxmis \fR --.ad --.RS 14n --mutex_miss per second --.RE -- --.sp --.ne 2 --.na --\fBl2bytes \fR --.ad --.RS 14n --Bytes read per second from the L2ARC --.RE -- --.sp --.ne 2 --.na --\fBl2miss% \fR --.ad --.RS 14n --L2ARC access miss percentage --.RE -- --.sp --.ne 2 --.na --\fBl2asize \fR --.ad --.RS 14n --Actual (compressed) size of the L2ARC --.RE -- --.sp --.ne 2 --.na --\fBgrow \fR --.ad --.RS 14n --ARC grow disabled --.RE -- --.sp --.ne 2 --.na --\fBneed \fR --.ad --.RS 14n --ARC reclaim needed --.RE -- --.sp --.ne 2 --.na --\fBfree \fR --.ad --.RS 14n --The ARC's idea of how much free memory there is, which includes evictable memory in the page cache. --Since the ARC tries to keep \fBavail\fR above zero, \fBavail\fR is usually more instructive to observe than \fBfree\fR. --.RE -- --.sp --.ne 2 --.na --\fBavail \fR --.ad --.RS 14n --The ARC's idea of how much free memory is available to it, which is a bit less than \fBfree\fR. --May temporarily be negative, in which case the ARC will reduce the target size \fBc\fR. --.RE --.\" -- --.SH OPTIONS --.LP --The following options are supported: -- --.sp --.ne 2 --.na --\fB\fB-a\fR\fR --.ad --.RS 12n --Print all possible stats. --.RE -- --.sp --.ne 2 --.na --\fB\fB-f\fR\fR --.ad --.RS 12n --Display only specific fields. See \fBDESCRIPTION\fR for supported statistics. --.RE -- --.sp --.ne 2 --.na --\fB\fB-h\fR\fR --.ad --.RS 12n --Display help message. --.RE -- --.sp --.ne 2 --.na --\fB\fB-o\fR\fR --.ad --.RS 12n --Report statistics to a file instead of the standard output. --.RE -- --.sp --.ne 2 --.na --\fB\fB-p\fR\fR --.ad --.RS 12n --Disable auto-scaling of numerical fields (for raw, machine-parsable values). --.RE -- --.sp --.ne 2 --.na --\fB\fB-s\fR\fR --.ad --.RS 12n --Display data with a specified separator (default: 2 spaces). --.RE -- --.sp --.ne 2 --.na --\fB\fB-x\fR\fR --.ad --.RS 12n --Print extended stats (same as -f time,mfu,mru,mfug,mrug,eskip,mtxmis,dread,pread,read). --.RE -- --.sp --.ne 2 --.na --\fB\fB-v\fR\fR --.ad --.RS 12n --Show field headers and definitions --.RE -- --.SH OPERANDS --.LP --The following operands are supported: --.sp --.ne 2 --.na --\fB\fIcount\fR\fR --.ad --.RS 12n --Display only \fIcount\fR reports. --.RE -- --.sp --.ne 2 --.na --\fB\fIinterval\fR\fR --.ad --.RS 12n --Specify the sampling interval in seconds. --.RE -- --.SH AUTHORS --.LP --arcstat was originally written in Perl by Neelakanth Nadgir and supported only ZFS ARC statistics. --Mike Harsch updated it to support L2ARC statistics. --John Hixson ported it to Python for FreeNAS over some beer, after which many individuals from the OpenZFS community continued to maintain and improve it. ---- /dev/null -+++ b/man/man8/arcstat.8 -@@ -0,0 +1,520 @@ -+.\" -+.\" This file and its contents are supplied under the terms of the -+.\" Common Development and Distribution License ("CDDL"), version 1.0. -+.\" You may only use this file in accordance with the terms of version -+.\" 1.0 of the CDDL. -+.\" -+.\" A full copy of the text of the CDDL should have accompanied this -+.\" source. A copy of the CDDL is also available via the Internet at -+.\" http://www.illumos.org/license/CDDL. -+.\" -+.\" -+.\" Copyright 2014 Adam Stevko. All rights reserved. -+.\" Copyright (c) 2015 by Delphix. All rights reserved. -+.\" Copyright (c) 2020 by AJ Jordan. All rights reserved. -+.\" -+.TH ARCSTAT 8 "Oct 20, 2020" OpenZFS -+.SH NAME -+arcstat \- report ZFS ARC and L2ARC statistics -+.SH SYNOPSIS -+.LP -+.nf -+\fBarcstat\fR [\fB-havxp\fR] [\fB-f field[,field]...\fR] [\fB-o file\fR] [\fB-s string\fR] [\fBinterval\fR [\fBcount\fR]] -+.fi -+ -+.SH DESCRIPTION -+.LP -+The \fBarcstat\fR utility print various ZFS ARC and L2ARC statistics in -+vmstat-like fashion. -+.sp -+ -+.sp -+.LP -+The \fBarcstat\fR command reports the following information: -+.sp -+.ne 2 -+ -+.\" -+.sp -+.ne 1 -+.na -+\fBc \fR -+.ad -+.RS 14n -+ARC target size -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBdh% \fR -+.ad -+.RS 14n -+Demand data hit percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBdm% \fR -+.ad -+.RS 14n -+Demand data miss percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmfu \fR -+.ad -+.RS 14n -+MFU list hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmh% \fR -+.ad -+.RS 14n -+Metadata hit percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmm% \fR -+.ad -+.RS 14n -+Metadata miss percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmru \fR -+.ad -+.RS 14n -+MRU list hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBph% \fR -+.ad -+.RS 14n -+Prefetch hits percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBpm% \fR -+.ad -+.RS 14n -+Prefetch miss percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBdhit \fR -+.ad -+.RS 14n -+Demand data hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBdmis \fR -+.ad -+.RS 14n -+Demand data misses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBhit% \fR -+.ad -+.RS 14n -+ARC hit percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBhits \fR -+.ad -+.RS 14n -+ARC reads per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmfug \fR -+.ad -+.RS 14n -+MFU ghost list hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmhit \fR -+.ad -+.RS 14n -+Metadata hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmiss \fR -+.ad -+.RS 14n -+ARC misses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmmis \fR -+.ad -+.RS 14n -+Metadata misses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmrug \fR -+.ad -+.RS 14n -+MRU ghost list hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBphit \fR -+.ad -+.RS 14n -+Prefetch hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBpmis \fR -+.ad -+.RS 14n -+Prefetch misses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBread \fR -+.ad -+.RS 14n -+Total ARC accesses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBtime \fR -+.ad -+.RS 14n -+Time -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBsize \fR -+.ad -+.RS 14n -+ARC size -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBarcsz \fR -+.ad -+.RS 14n -+Alias for \fBsize\fR -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBdread \fR -+.ad -+.RS 14n -+Demand data accesses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBeskip \fR -+.ad -+.RS 14n -+evict_skip per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmiss% \fR -+.ad -+.RS 14n -+ARC miss percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmread \fR -+.ad -+.RS 14n -+Metadata accesses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBpread \fR -+.ad -+.RS 14n -+Prefetch accesses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2hit% \fR -+.ad -+.RS 14n -+L2ARC access hit percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2hits \fR -+.ad -+.RS 14n -+L2ARC hits per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2miss \fR -+.ad -+.RS 14n -+L2ARC misses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2read \fR -+.ad -+.RS 14n -+Total L2ARC accesses per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2size \fR -+.ad -+.RS 14n -+Size of the L2ARC -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBmtxmis \fR -+.ad -+.RS 14n -+mutex_miss per second -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2bytes \fR -+.ad -+.RS 14n -+Bytes read per second from the L2ARC -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2miss% \fR -+.ad -+.RS 14n -+L2ARC access miss percentage -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBl2asize \fR -+.ad -+.RS 14n -+Actual (compressed) size of the L2ARC -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBgrow \fR -+.ad -+.RS 14n -+ARC grow disabled -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBneed \fR -+.ad -+.RS 14n -+ARC reclaim needed -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBfree \fR -+.ad -+.RS 14n -+The ARC's idea of how much free memory there is, which includes evictable memory in the page cache. -+Since the ARC tries to keep \fBavail\fR above zero, \fBavail\fR is usually more instructive to observe than \fBfree\fR. -+.RE -+ -+.sp -+.ne 2 -+.na -+\fBavail \fR -+.ad -+.RS 14n -+The ARC's idea of how much free memory is available to it, which is a bit less than \fBfree\fR. -+May temporarily be negative, in which case the ARC will reduce the target size \fBc\fR. -+.RE -+.\" -+ -+.SH OPTIONS -+.LP -+The following options are supported: -+ -+.sp -+.ne 2 -+.na -+\fB\fB-a\fR\fR -+.ad -+.RS 12n -+Print all possible stats. -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fB-f\fR\fR -+.ad -+.RS 12n -+Display only specific fields. See \fBDESCRIPTION\fR for supported statistics. -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fB-h\fR\fR -+.ad -+.RS 12n -+Display help message. -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fB-o\fR\fR -+.ad -+.RS 12n -+Report statistics to a file instead of the standard output. -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fB-p\fR\fR -+.ad -+.RS 12n -+Disable auto-scaling of numerical fields (for raw, machine-parsable values). -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fB-s\fR\fR -+.ad -+.RS 12n -+Display data with a specified separator (default: 2 spaces). -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fB-x\fR\fR -+.ad -+.RS 12n -+Print extended stats (same as -f time,mfu,mru,mfug,mrug,eskip,mtxmis,dread,pread,read). -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fB-v\fR\fR -+.ad -+.RS 12n -+Show field headers and definitions -+.RE -+ -+.SH OPERANDS -+.LP -+The following operands are supported: -+.sp -+.ne 2 -+.na -+\fB\fIcount\fR\fR -+.ad -+.RS 12n -+Display only \fIcount\fR reports. -+.RE -+ -+.sp -+.ne 2 -+.na -+\fB\fIinterval\fR\fR -+.ad -+.RS 12n -+Specify the sampling interval in seconds. -+.RE -+ -+.SH AUTHORS -+.LP -+arcstat was originally written in Perl by Neelakanth Nadgir and supported only ZFS ARC statistics. -+Mike Harsch updated it to support L2ARC statistics. -+John Hixson ported it to Python for FreeNAS over some beer, after which many individuals from the OpenZFS community continued to maintain and improve it. +diff --git a/man/Makefile.am b/man/Makefile.am +index 8ab1b7572..8b3dbe633 100644 +--- a/man/Makefile.am ++++ b/man/Makefile.am +@@ -8,7 +8,6 @@ dist_man_MANS = \ + man1/ztest.1 \ + man1/raidz_test.1 \ + man1/zvol_wait.1 \ +- man1/arcstat.1 \ + \ + man5/vdev_id.conf.5 \ + \ +@@ -21,6 +20,7 @@ dist_man_MANS = \ + man7/zpoolconcepts.7 \ + man7/zpoolprops.7 \ + \ ++ man8/arcstat.8 \ + man8/fsck.zfs.8 \ + man8/mount.zfs.8 \ + man8/vdev_id.8 \ +diff --git a/man/man1/arcstat.1 b/man/man8/arcstat.8 +similarity index 100% +rename from man/man1/arcstat.1 +rename to man/man8/arcstat.8 diff --git a/debian/patches/series b/debian/patches/series index 8427c099a05e..abc8b6e85c43 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -16,13 +16,3 @@ force-verbose-rules.patch 4620-zfs-vol-wait-fix-locked-encrypted-vols.patch move-arcstat-1-to-8.patch #ubuntu/4701-enable-ARC-FILL-LOCKED-flag.patch -0010-Fix-report_mount_progress-never-calling-set_progress.patch -0014-libzpool-set_global_var-fix-endianness-handling-fixe.patch -0019-Better-zfs_get_enclosure_sysfs_path-enclosure-suppor.patch -0020-vdev_ops-don-t-try-to-call-vdev_op_hold-or-vdev_op_r.patch -0026-Linux-increase-max-nvlist_src-size.patch -0028-Fix-overly-broad-locking-in-spa_vdev_config_exit.patch -0035-Cancel-TRIM-initialize-on-FAULTED-non-writeable-vdev.patch -0037-linux-zvol-avoid-heap-allocation-for-zvol_request_sy.patch -0038-Don-t-bomb-out-when-using-keylocation-file.patch -0001-Remove-iov_iter_advance-for-iter_write.patch diff --git a/debian/zfs-dkms.install b/debian/zfs-dkms.install index b601f22c481a..26681e781f7f 100644 --- a/debian/zfs-dkms.install +++ b/debian/zfs-dkms.install @@ -1 +1,3 @@ usr/src +usr/share/man/man4/spl.4 +usr/share/man/man4/zfs.4 diff --git a/debian/zfsutils-linux.install b/debian/zfsutils-linux.install index 7b4dffd4144b..ae416e83a93a 100644 --- a/debian/zfsutils-linux.install +++ b/debian/zfsutils-linux.install @@ -1,4 +1,4 @@ -../tree/zfsutils-linux/* / +debian/tree/zfsutils-linux/* / etc/default/zfs etc/zfs/zfs-functions etc/zfs/zpool.d/ @@ -27,6 +27,7 @@ sbin/zstreamdump usr/bin/zvol_wait /sbin/ usr/lib/modules-load.d/ lib/ usr/lib/zfs-linux/zpool.d/ +usr/lib/zfs-linux/zpool_influxdb /usr/sbin/ usr/sbin/arc_summary usr/sbin/arcstat usr/sbin/dbufstat @@ -35,6 +36,11 @@ usr/share/man/man8/arcstat.8 usr/share/man/man1/zhack.1 usr/share/man/man1/zvol_wait.1 usr/share/man/man5/ +usr/share/man/man7/zfsconcepts.7 +usr/share/man/man7/zfsprops.7 +usr/share/man/man7/zpoolconcepts.7 +usr/share/man/man7/zpoolprops.7 +usr/share/man/man7/zpool-features.7 usr/share/man/man8/fsck.zfs.8 usr/share/man/man8/mount.zfs.8 usr/share/man/man8/vdev_id.8 @@ -78,8 +84,6 @@ usr/share/man/man8/zfs-userspace.8 usr/share/man/man8/zfs-wait.8 usr/share/man/man8/zfs.8 usr/share/man/man8/zfs_ids_to_path.8 -usr/share/man/man8/zfsconcepts.8 -usr/share/man/man8/zfsprops.8 usr/share/man/man8/zgenhostid.8 usr/share/man/man8/zpool-add.8 usr/share/man/man8/zpool-attach.8 @@ -93,6 +97,7 @@ usr/share/man/man8/zpool-export.8 usr/share/man/man8/zpool-get.8 usr/share/man/man8/zpool-history.8 usr/share/man/man8/zpool-import.8 +usr/share/man/man8/zpool_influxdb.8 usr/share/man/man8/zpool-initialize.8 usr/share/man/man8/zpool-iostat.8 usr/share/man/man8/zpool-labelclear.8 @@ -113,7 +118,6 @@ usr/share/man/man8/zpool-trim.8 usr/share/man/man8/zpool-upgrade.8 usr/share/man/man8/zpool-wait.8 usr/share/man/man8/zpool.8 -usr/share/man/man8/zpoolconcepts.8 -usr/share/man/man8/zpoolprops.8 usr/share/man/man8/zstream.8 usr/share/man/man8/zstreamdump.8 +usr/share/zfs/compatibility.d/