Liron Ar has posted comments on this change.
Change subject: core: export vm - perform space checks only for relevant disks
......................................................................
Patch Set 4:
(5 comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java
Line 154: // get the snapshot that are going to be exported and have
memory
Line 155: snapshotsWithMemory = getSnapshotsToBeExportedWithMemory();
Line 156:
Line 157: // check destination storage have free space
Line 158: int sizeInGB = (int)
ImagesHandler.sumImagesTotalSizeWithSnapshotSize(disksForExport) +
getTotalMemoryStatesSizeGb();
haven't changed this in this patch, it was left as before.
Line 159: if (!doesStorageDomainhaveSpaceForRequest(getStorageDomain(),
sizeInGB)) {
Line 160: return false;
Line 161: }
Line 162:
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java
Line 457: return result;
Line 458: }
Line 459:
Line 460: /**
Line 461: * sum and returns the size of the given disks and their snapshots
Done
Line 462: * note: the snapshots of the disks should be loaded prior to
calling
Line 463: * this method.
Line 464: * @param diskImages
Line 465: * @return the sum of the given disks size with snapshots
Line 458: }
Line 459:
Line 460: /**
Line 461: * sum and returns the size of the given disks and their snapshots
Line 462: * note: the snapshots of the disks should be loaded prior to
calling
Done
Line 463: * this method.
Line 464: * @param diskImages
Line 465: * @return the sum of the given disks size with snapshots
Line 466: */
Line 460: /**
Line 461: * sum and returns the size of the given disks and their snapshots
Line 462: * note: the snapshots of the disks should be loaded prior to
calling
Line 463: * this method.
Line 464: * @param diskImages
Done
Line 465: * @return the sum of the given disks size with snapshots
Line 466: */
Line 467: public static double
sumImagesTotalSizeWithSnapshotSize(Collection<DiskImage> diskImages) {
Line 468: double sum = 0;
Line 461: * sum and returns the size of the given disks and their snapshots
Line 462: * note: the snapshots of the disks should be loaded prior to
calling
Line 463: * this method.
Line 464: * @param diskImages
Line 465: * @return the sum of the given disks size with snapshots
Done
Line 466: */
Line 467: public static double
sumImagesTotalSizeWithSnapshotSize(Collection<DiskImage> diskImages) {
Line 468: double sum = 0;
Line 469: for (DiskImage diskImage : diskImages) {
--
To view, visit http://gerrit.ovirt.org/20756
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I8d7b8eae635ac88af5c3e1ffbe08be7fcdf9da72
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches