[pve-devel] [PATCH zfsonlinux 2/2] /lib/zfs-linux/trim: don't exit 1 if last pool isn't nvme-only (Closes: #1030316)

Stoiko Ivanov s.ivanov at proxmox.com
Tue Jun 13 11:57:53 CEST 2023


(cherry picked from debian-upstream[0]
commit 8ed69adac193f6463832f6ae34b5ded88b8014d8)

[0] https://salsa.debian.org/zfsonlinux-team/zfs
Signed-off-by: Stoiko Ivanov <s.ivanov at proxmox.com>
---
 debian/tree/zfsutils-linux/usr/lib/zfs-linux/trim | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/debian/tree/zfsutils-linux/usr/lib/zfs-linux/trim b/debian/tree/zfsutils-linux/usr/lib/zfs-linux/trim
index 341a2fbb..a807ecc5 100755
--- a/debian/tree/zfsutils-linux/usr/lib/zfs-linux/trim
+++ b/debian/tree/zfsutils-linux/usr/lib/zfs-linux/trim
@@ -60,7 +60,7 @@ do
 	case "${ret}" in
 		disable);;
 		enable)	trim_if_not_already_trimming "${pool}" ;;
-		-|auto)	pool_is_nvme_only "${pool}" && trim_if_not_already_trimming "${pool}" ;;
+		-|auto)	if pool_is_nvme_only "${pool}"; then trim_if_not_already_trimming "${pool}"; fi ;;
 		*)	cat > /dev/stderr <<EOF
 $0: [WARNING] illegal value "${ret}" for property "${PROPERTY_NAME}" of ZFS dataset "${pool}".
 $0: Acceptable choices for this property are: auto, enable, disable. The default is auto.
-- 
2.30.2






More information about the pve-devel mailing list