Skip to content

Commit

Permalink
fix(zfs-localpv): replace quota case with default in thin provisionin…
Browse files Browse the repository at this point in the history
…g switch case

Signed-off-by: cina_pm <[email protected]>
  • Loading branch information
cinapm committed Jul 19, 2024
1 parent 63f9366 commit 68d49ed
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/zfs/zfs_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down Expand Up @@ -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)
}
Expand Down

0 comments on commit 68d49ed

Please sign in to comment.