Allon Mureinik has posted comments on this change. Change subject: core: Fix storage allocation check when merging a snapshot ......................................................................
Patch Set 7: (2 comments) After a face to face talk - the DiskImage change should be removed, the rest of the patch is FINE. http://gerrit.ovirt.org/#/c/37014/7/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ImagesHandler.java: Line 883: DiskImage clone = DiskImage.copyOf(snapshot); Line 884: // Add the child snapshot into which the deleted snapshot is going to be merged to the Line 885: // DiskImage for StorageDomainValidator to handle Line 886: List<DiskImage> snapshots = DbFacade.getInstance().getDiskImageDao().getAllSnapshotsForParent(clone.getImageId()); Line 887: clone.getSnapshots().clear(); > I didn't. I said I'll deep copy it plus there's no good reason not to deep Talked face-to-face - we had a misundertanding here. This method is fine. Line 888: clone.getSnapshots().add(clone); // Add the clone itself since snapshots should contain the entire chain. Line 889: clone.getSnapshots().addAll(snapshots); Line 890: diskDummies.add(clone); Line 891: } http://gerrit.ovirt.org/#/c/37014/7/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/DiskImage.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/DiskImage.java: Line 479: di.setImageStatus(ImageStatus.LOCKED); Line 480: return di; Line 481: } Line 482: Line 483: public static ArrayList<DiskImage> clonedList (List<DiskImage> disksList) { Talked face-to-face - we had a misundertanding here - this whole treatment is redundant, and should be removed. Line 484: ArrayList<DiskImage> clonedList = new ArrayList<>(disksList.size()); Line 485: for (DiskImage image : disksList) { Line 486: DiskImage clone = DiskImage.copyOf(image); Line 487: clonedList.add(clone); -- To view, visit http://gerrit.ovirt.org/37014 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I41213884ed0ca9ddf8354ab7be58f032a6d90673 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vered Volansky <[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: Freddy Rolland <[email protected]> Gerrit-Reviewer: Idan Shaby <[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
