Arik Hadas has posted comments on this change.
Change subject: core: remove memory image on remove snapshot
......................................................................
Patch Set 8: (2 inline comments)
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveSnapshotCommand.java
Line 123: }
Line 124:
Line 125: private boolean shouldRemoveSnapshotMemory(String memoryVolume) {
Line 126: return !memoryVolume.isEmpty() &&
Line 127:
getSnapshotDao().getNumOfSnapshotsByMemory(memoryVolume) == 1;
I've added a javadoc to explain the logic as it's not clear from the code,
please check it and let me know if you still think this logic should be changed
Line 128: }
Line 129:
Line 130: private void removeMemory(final Snapshot snapshot) {
Line 131: String[] strings = snapshot.getMemoryVolume().split(",");
Line 131: String[] strings = snapshot.getMemoryVolume().split(",");
Line 132: Guid[] guids = new Guid[strings.length];
Line 133: for (int i=0; i<strings.length; ++i) {
Line 134: guids[i]= new Guid(strings[i]);
Line 135: }
Done
Line 136: // get all vm disks in order to check post zero - if one of
the
Line 137: // disks is marked with wipe_after_delete
Line 138: boolean postZero =
Line 139:
LinqUtils.filter(getDiskDao().getAllForVm(getVm().getId()),
--
To view, visit http://gerrit.ovirt.org/14687
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I88a707457b3b1565a887e141d18d9d08a2dbcc69
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches