Allon Mureinik has posted comments on this change.

Change subject: core: Requesting to consume quota while extending a disk fix.
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/39330/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmDiskCommand.java:

Line 689:             boolean emptyOldQuota = oldDiskImage.getQuotaId() == null 
|| Guid.Empty.equals(oldDiskImage.getQuotaId());
Line 690:             boolean differentNewQuota = !emptyOldQuota && 
!oldDiskImage.getQuotaId().equals(newDiskImage.getQuotaId());
Line 691:             long diskExtendingDiff = 
newDiskImage.getSizeInGigabytes() - oldDiskImage.getSizeInGigabytes();
Line 692: 
Line 693:             if (emptyOldQuota || differentNewQuota ) {
> Actually, the fact that the old quota was empty seems inconsequential.
I had some offline questions on this comments, so to clarify - I'm claiming 
that the "emptyOldQuota" variable is redundant, and we should just drop it.
Line 694:                 list.add(generateQuotaConsumeParameters(newDiskImage, 
newDiskImage.getSizeInGigabytes()));
Line 695:             } else if (diskExtendingDiff != 0) {
Line 696:                 list.add(generateQuotaConsumeParameters(newDiskImage, 
diskExtendingDiff));
Line 697:             }


-- 
To view, visit https://gerrit.ovirt.org/39330
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib31206b0a9172b35217845b01253951d93f380f1
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Amit Aviram <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Ala Hino <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Amit Aviram <[email protected]>
Gerrit-Reviewer: Candace Sheremeta <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Greg Padgett <[email protected]>
Gerrit-Reviewer: Idan Shaby <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
Gerrit-Reviewer: [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

Reply via email to