mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
record used byte not available byte
This commit is contained in:
parent
188711c18d
commit
c9ae6fd09d
@ -1749,7 +1749,11 @@ public class StorageManagerImpl implements StorageManager {
|
||||
} else {
|
||||
CapacityVO capacity = capacities.get(0);
|
||||
capacity.setTotalCapacity(storagePool.getCapacityBytes());
|
||||
capacity.setUsedCapacity(storagePool.getAvailableBytes());
|
||||
long used = storagePool.getCapacityBytes() - storagePool.getAvailableBytes();
|
||||
if( used <= 0 ) {
|
||||
used = 0;
|
||||
}
|
||||
capacity.setUsedCapacity(used);
|
||||
_capacityDao.update(capacity.getId(), capacity);
|
||||
}
|
||||
s_logger.debug("Successfully set Capacity - " +storagePool.getCapacityBytes()+ " for CAPACITY_TYPE_STORAGE, DataCenterId - " +storagePool.getDataCenterId()+ ", HostOrPoolId - " +storagePool.getId()+ ", PodId " +storagePool.getPodId());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user