From 68d49edb562ef01c8175552f3d5a7b3abeec10e5 Mon Sep 17 00:00:00 2001 From: cina_pm Date: Fri, 19 Jul 2024 17:56:44 +0330 Subject: [PATCH] fix(zfs-localpv): replace quota case with default in thin provisioning switch case Signed-off-by: cina_pm --- pkg/zfs/zfs_util.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/zfs/zfs_util.go b/pkg/zfs/zfs_util.go index 04c70d026..896946ebb 100644 --- a/pkg/zfs/zfs_util.go +++ b/pkg/zfs/zfs_util.go @@ -153,10 +153,10 @@ func buildCloneCreateArgs(vol *apis.ZFSVolume) []string { if vol.Spec.ThinProvision == "no" { reservationProperty := "" switch vol.Spec.QuotaType { - case "quota": - reservationProperty = "reservation=" + vol.Spec.Capacity case "refquota": reservationProperty = "refreservation=" + vol.Spec.Capacity + default: + reservationProperty = "reservation=" + vol.Spec.Capacity } ZFSVolArg = append(ZFSVolArg, "-o", reservationProperty) } @@ -232,10 +232,10 @@ func buildDatasetCreateArgs(vol *apis.ZFSVolume) []string { if vol.Spec.ThinProvision == "no" { reservationProperty := "" switch vol.Spec.QuotaType { - case "quota": - reservationProperty = "reservation=" + vol.Spec.Capacity case "refquota": reservationProperty = "refreservation=" + vol.Spec.Capacity + default: + reservationProperty = "reservation=" + vol.Spec.Capacity } ZFSVolArg = append(ZFSVolArg, "-o", reservationProperty) }