Omer Frenkel has posted comments on this change. Change subject: core: [WIP] save memory state on live snapshot with memory ......................................................................
Patch Set 7: (6 inline comments) .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CreateAllSnapshotsFromVmCommand.java Line 126: } Line 127: setSucceeded(true); Line 128: } Line 129: Line 130: private Guid _storageDomainId = Guid.Empty; members should be on top of the class Line 131: Line 132: @Override Line 133: public NGuid getStorageDomainId() { Line 134: if (_storageDomainId.equals(Guid.Empty) && getVm() != null) { Line 131: Line 132: @Override Line 133: public NGuid getStorageDomainId() { Line 134: if (_storageDomainId.equals(Guid.Empty) && getVm() != null) { Line 135: long sizeNeeded = getVm().getTotalMemorySizeInBytes() / BYTES_IN_GB; what about metadata file? Line 136: StorageDomain storageDomain = VmHandler.findStorageDomainForMemory(getVm().getStoragePoolId(), sizeNeeded); Line 137: if (storageDomain != null) { Line 138: _storageDomainId = storageDomain.getId(); Line 139: } Line 311: if (FeatureSupported.memorySnapshot(ClusterUtils.getCompatilibilyVersion(getVm()))) { Line 312: return new SnapshotVDSCommandParameters(getVm().getRunOnVds().getValue(), Line 313: getVm().getId(), Line 314: ImagesHandler.filterImageDisks(pluggedDisks, false, true), Line 315: snapshot.getMemoryVolume()); what will happen if isSaveMemory is false? Line 316: } Line 317: else { Line 318: return new SnapshotVDSCommandParameters(getVm().getRunOnVds().getValue(), Line 319: getVm().getId(), Line 465: private Guid storagePoolId; Line 466: private Guid imageGroupId; Line 467: private Guid volumeId; Line 468: private Guid imageGroupId2; Line 469: private Guid volumeId2; please give better names, mem and metadata or something similar Line 470: Line 471: private DefaultMemoryImageBuilder() { Line 472: this.storageDomainId = getStorageDomainId().getValue(); Line 473: this.storagePoolId = getVm().getStoragePoolId(); .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/HibernateVmCommand.java Line 378: static long getMetaDataSizeInBytes() { Line 379: return (long) 10 * 1024; Line 380: } Line 381: Line 382: private static Log log = LogFactory.getLog(HibernateVmCommand.class); builders could be used here as well .................................................... File backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/SnapshotDaoDbFacadeImpl.java Line 85: parameterSource); Line 86: } Line 87: Line 88: @Override Line 89: public Snapshot get(Guid vmId, SnapshotType type, SnapshotStatus status) { dao test? Line 90: MapSqlParameterSource parameterSource = getCustomMapSqlParameterSource() Line 91: .addValue("vm_id", vmId) Line 92: .addValue("snapshot_type", EnumUtils.nameOrNull(type)) Line 93: .addValue("status", EnumUtils.nameOrNull(status)); -- To view, visit http://gerrit.ovirt.org/14291 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ifbb28efda1b63e506233a88399488a256e6ab1c8 Gerrit-PatchSet: 7 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com> Gerrit-Reviewer: Roy Golan <rgo...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches