Liron Aravot has posted comments on this change. Change subject: core: attach device ioTune map ......................................................................
Patch Set 4: (3 comments) http://gerrit.ovirt.org/#/c/29816/4/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/VmInfoBuilder.java: Line 365: Guid diskProfileId = diskImage.getDiskProfileId(); Line 366: if (diskProfileId == null) { Line 367: return null; Line 368: } Line 369: StorageQos storageQos = diskProfileStorageQosMap.get(diskProfileId); - perhaps my last comment on that was bit misspelled. the values in the map should be the prepared ioTune Map imo, no need to build it multiple times...if we already cache, let's cache this. - generally, i think that we better add to disk image .getQodId() somewhen. Line 370: if (storageQos == null) { Line 371: storageQos = DbFacade.getInstance().getStorageQosDao().GetQosByDiskProfileId(diskProfileId); Line 372: if (storageQos == null) { Line 373: return null; Line 374: } else { Line 375: diskProfileStorageQosMap.put(diskProfileId, storageQos); Line 376: } Line 377: } Line 378: // build map i'd export all the logic below to a separate function. but that's matter of preference :) Line 379: Map<String, Integer> ioTuneMap = new HashMap<>(); Line 380: if (storageQos.getMaxThroughput() != null) { Line 381: ioTuneMap.put(VdsProperties.TotalBytesSec, storageQos.getMaxThroughput()); Line 382: } Line 1086: addressMap.put(VdsProperties.Unit, String.valueOf(unit)); Line 1087: return addressMap; Line 1088: } Line 1089: Line 1090: @Override ? Line 1091: protected void buildVmRngDevice() { Line 1092: List<VmDevice> vmDevices = Line 1093: DbFacade.getInstance() Line 1094: .getVmDeviceDao() -- To view, visit http://gerrit.ovirt.org/29816 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I515caa7ff8996711610a77a57d6683d2655545de Gerrit-PatchSet: 4 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Arik Hadas <aha...@redhat.com> Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com> Gerrit-Reviewer: Kobi Ianko <k...@redhat.com> Gerrit-Reviewer: Liron Aravot <lara...@redhat.com> Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com> Gerrit-Reviewer: Martin Sivák <msi...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches