Skip to content

Commit 2cbc168

Browse files
author
Mike Tutkowski
committed
The lowest the hypervisor snapshot reserve value can be is 10 (down from 50).
1 parent 97eb0f7 commit 2cbc168

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

plugins/storage/volume/solidfire/src/org/apache/cloudstack/storage/datastore/driver/SolidFirePrimaryDataStoreDriver.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
public class SolidFirePrimaryDataStoreDriver implements PrimaryDataStoreDriver {
7878
private static final Logger s_logger = Logger.getLogger(SolidFirePrimaryDataStoreDriver.class);
7979
private static final int s_lockTimeInSeconds = 300;
80+
private static final int s_lowestHypervisorSnapshotReserve = 10;
8081

8182
@Inject private AccountDao _accountDao;
8283
@Inject private AccountDetailsDao _accountDetailsDao;
@@ -352,9 +353,7 @@ public long getVolumeSizeIncludingHypervisorSnapshotReserve(Volume volume, Stora
352353
Integer hypervisorSnapshotReserve = volume.getHypervisorSnapshotReserve();
353354

354355
if (hypervisorSnapshotReserve != null) {
355-
if (hypervisorSnapshotReserve < 50) {
356-
hypervisorSnapshotReserve = 50;
357-
}
356+
hypervisorSnapshotReserve = Math.max(hypervisorSnapshotReserve, s_lowestHypervisorSnapshotReserve);
358357

359358
volumeSize += volumeSize * (hypervisorSnapshotReserve / 100f);
360359
}

0 commit comments

Comments
 (0)