/lib/zfs-linux/trim: don't exit 1 if last pool isn't nvme-only (Closes: #1030316)

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

[0] https://salsa.debian.org/zfsonlinux-team/zfs
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
Stoiko Ivanov 2023-06-13 11:57:53 +02:00 committed by Thomas Lamprecht
parent 63e591d8a9
commit 5891aaec34

View File

@ -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.