68be554e71
Use the current ZFS 2.2.4 staging tree [0] with commit deb7a8423 ("Fix corruption caused by mmap flushing problems") on top. Additionally, include an open, but ack'd, pull request [1] that avoids a potential general protection fault due to touching a vbio after it was handed off to the kernel. [0]: https://github.com/openzfs/zfs/commits/zfs-2.2.4-staging/ [1]: https://github.com/openzfs/zfs/pull/16049 Both should mostly touch the module code. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
91 lines
3.8 KiB
Diff
91 lines
3.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Rob Norris <rob.norris@klarasystems.com>
|
|
Date: Wed, 27 Mar 2024 13:11:12 +1100
|
|
Subject: [PATCH] vdev_disk: default to classic submission for 2.2.x
|
|
|
|
We don't want to change to brand-new code in the middle of a stable
|
|
series, but we want it available to test for people running into page
|
|
splitting issues.
|
|
|
|
This commits make zfs_vdev_disk_classic=1 the default, and updates the
|
|
documentation to better explain what's going on.
|
|
|
|
Signed-off-by: Rob Norris <rob.norris@klarasystems.com>
|
|
Sponsored-by: Klara, Inc.
|
|
Sponsored-by: Wasabi Technology, Inc.
|
|
---
|
|
man/man4/zfs.4 | 31 ++++++++++++++++++++++---------
|
|
module/os/linux/zfs/vdev_disk.c | 8 +++++---
|
|
2 files changed, 27 insertions(+), 12 deletions(-)
|
|
|
|
diff --git a/man/man4/zfs.4 b/man/man4/zfs.4
|
|
index 6a628e7f3..a98ec519a 100644
|
|
--- a/man/man4/zfs.4
|
|
+++ b/man/man4/zfs.4
|
|
@@ -1355,17 +1355,30 @@ This parameter only applies on Linux.
|
|
This parameter is ignored if
|
|
.Sy zfs_vdev_disk_classic Ns = Ns Sy 1 .
|
|
.
|
|
-.It Sy zfs_vdev_disk_classic Ns = Ns Sy 0 Ns | Ns 1 Pq uint
|
|
-If set to 1, OpenZFS will submit IO to Linux using the method it used in 2.2
|
|
-and earlier.
|
|
-This "classic" method has known issues with highly fragmented IO requests and
|
|
-is slower on many workloads, but it has been in use for many years and is known
|
|
-to be very stable.
|
|
-If you set this parameter, please also open a bug report why you did so,
|
|
+.It Sy zfs_vdev_disk_classic Ns = Ns 0 Ns | Ns Sy 1 Pq uint
|
|
+Controls the method used to submit IO to the Linux block layer
|
|
+(default
|
|
+.Sy 1 "classic" Ns
|
|
+)
|
|
+.Pp
|
|
+If set to 1, the "classic" method is used.
|
|
+This is the method that has been in use since the earliest versions of
|
|
+ZFS-on-Linux.
|
|
+It has known issues with highly fragmented IO requests and is less efficient on
|
|
+many workloads, but it well known and well understood.
|
|
+.Pp
|
|
+If set to 0, the "new" method is used.
|
|
+This method is available since 2.2.4 and should resolve all known issues and be
|
|
+far more efficient, but has not had as much testing.
|
|
+In the 2.2.x series, this parameter defaults to 1, to use the "classic" method.
|
|
+.Pp
|
|
+It is not recommended that you change it except on advice from the OpenZFS
|
|
+developers.
|
|
+If you do change it, please also open a bug report describing why you did so,
|
|
including the workload involved and any error messages.
|
|
.Pp
|
|
-This parameter and the classic submission method will be removed once we have
|
|
-total confidence in the new method.
|
|
+This parameter and the "classic" submission method will be removed in a future
|
|
+release of OpenZFS once we have total confidence in the new method.
|
|
.Pp
|
|
This parameter only applies on Linux, and can only be set at module load time.
|
|
.
|
|
diff --git a/module/os/linux/zfs/vdev_disk.c b/module/os/linux/zfs/vdev_disk.c
|
|
index 36468fc21..e1c19a085 100644
|
|
--- a/module/os/linux/zfs/vdev_disk.c
|
|
+++ b/module/os/linux/zfs/vdev_disk.c
|
|
@@ -969,8 +969,10 @@ vdev_disk_io_rw(zio_t *zio)
|
|
/*
|
|
* This is the classic, battle-tested BIO submission code. Until we're totally
|
|
* sure that the new code is safe and correct in all cases, this will remain
|
|
- * available and can be enabled by setting zfs_vdev_disk_classic=1 at module
|
|
- * load time.
|
|
+ * available.
|
|
+ *
|
|
+ * It is enabled by setting zfs_vdev_disk_classic=1 at module load time. It is
|
|
+ * enabled (=1) by default since 2.2.4, and disabled by default (=0) on master.
|
|
*
|
|
* These functions have been renamed to vdev_classic_* to make it clear what
|
|
* they belong to, but their implementations are unchanged.
|
|
@@ -1468,7 +1470,7 @@ vdev_disk_rele(vdev_t *vd)
|
|
* BIO submission method. See comment above about vdev_classic.
|
|
* Set zfs_vdev_disk_classic=0 for new, =1 for classic
|
|
*/
|
|
-static uint_t zfs_vdev_disk_classic = 0; /* default new */
|
|
+static uint_t zfs_vdev_disk_classic = 1; /* default classic */
|
|
|
|
/* Set submission function from module parameter */
|
|
static int
|