JoaoJandre commented on code in PR #13286:
URL: https://github.com/apache/cloudstack/pull/13286#discussion_r3537467739
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java:
##########
@@ -657,6 +663,28 @@ public KVMStoragePool getStoragePool(String uuid, boolean
refreshInfo) {
}
}
+ private Long getBackingFileSizes(StoragePool pool, StorageVol vol) throws
LibvirtException {
+ long total = 0L;
+ Set<String> visited = new HashSet<>();
+ StorageVol current = vol;
+
+ while (current != null) {
+ total += current.getInfo().allocation;
+ String backingName = getBackingFileOfVolumeIfExists(current);
+ if (StringUtils.isBlank(backingName) || !visited.add(backingName))
{
+ break;
+ }
+ try {
+ current = getVolume(pool, backingName);
+ } catch (CloudRuntimeException e) {
+ logger.debug("Unable to resolve backing volume {} in pool {}:
{}", backingName, pool.getName(), e.getMessage());
Review Comment:
This should be at error level.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]