mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-03 04:12:31 +01:00
vmware: volume utilisation is always zero (#4225)
This fixes issues of virtual size to be twice in case the disk is a linked-clone root disk. The virtual size of root disk (first in chain) must be used. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
4527424fce
commit
2fce8b733e
@ -3766,7 +3766,6 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
||||
VolumeStatsEntry vse = statEntry.get(chainInfo);
|
||||
if (vse != null) {
|
||||
vse.setPhysicalSize(vse.getPhysicalSize() + physicalsize);
|
||||
vse.setVirtualSize(vse.getVirtualSize() + virtualsize);
|
||||
}
|
||||
} else {
|
||||
VolumeStatsEntry vse = new VolumeStatsEntry(chainInfo, physicalsize, virtualsize);
|
||||
|
||||
@ -268,7 +268,7 @@ public class ViewResponseHelper {
|
||||
|
||||
public static List<VolumeResponse> createVolumeResponse(ResponseView view, VolumeJoinVO... volumes) {
|
||||
Hashtable<Long, VolumeResponse> vrDataList = new Hashtable<Long, VolumeResponse>();
|
||||
DecimalFormat df = new DecimalFormat("0.00");
|
||||
DecimalFormat df = new DecimalFormat("0.0%");
|
||||
for (VolumeJoinVO vr : volumes) {
|
||||
VolumeResponse vrData = vrDataList.get(vr.getId());
|
||||
if (vrData == null) {
|
||||
|
||||
@ -356,6 +356,7 @@ public class DatastoreMO extends BaseMO {
|
||||
FileQueryFlags fqf = new FileQueryFlags();
|
||||
fqf.setFileSize(true);
|
||||
fqf.setFileOwner(true);
|
||||
fqf.setFileType(true);
|
||||
fqf.setModification(true);
|
||||
searchSpec.setDetails(fqf);
|
||||
searchSpec.setSearchCaseInsensitive(false);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user