Roy Golan has posted comments on this change. Change subject: core: Push ioTune QoS info when hotplugging disk ......................................................................
Patch Set 3: (2 comments) http://gerrit.ovirt.org/#/c/33907/3/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugDiskVDSCommand.java File backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/HotPlugDiskVDSCommand.java: Line 69: drive.put(VdsProperties.PropagateErrors, disk.getPropagateErrors().toString().toLowerCase()); Line 70: Line 71: // maps to avoid fetching qos object for same disk profile id Line 72: Map<Guid, Guid> diskProfileStorageQosMap = new HashMap<>(); Line 73: Map<Guid, Map<String, Long>> storageQosIoTuneMap = new HashMap<>(); > maybe it'll be better to tweak the code a bit to avoid creating those maps simply call the buildIoTune with new HashMap() <> instead of variables or create single argument version Line 74: Map<String, Long> ioTune = Line 75: VmInfoBuilder.buildIoTune(diskImage, diskProfileStorageQosMap, storageQosIoTuneMap); Line 76: if (ioTune != null) { Line 77: if (vmDevice.getSpecParams() == null) { Line 72: Map<Guid, Guid> diskProfileStorageQosMap = new HashMap<>(); Line 73: Map<Guid, Map<String, Long>> storageQosIoTuneMap = new HashMap<>(); Line 74: Map<String, Long> ioTune = Line 75: VmInfoBuilder.buildIoTune(diskImage, diskProfileStorageQosMap, storageQosIoTuneMap); Line 76: if (ioTune != null) { > this code should be shared with VmInfoBuilder somewhere, otherwise it's err yes this should go to some helper. Add one to org.ovirt.engine.core.vdsbroker IOTuneBuilder and add tests to the builder. Line 77: if (vmDevice.getSpecParams() == null) { Line 78: vmDevice.setSpecParams(new HashMap<String, Object>()); Line 79: } Line 80: vmDevice.getSpecParams().put(VdsProperties.Iotune, ioTune); -- To view, visit http://gerrit.ovirt.org/33907 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic4bb85cd307089088be77cff28adbc783ebcaedd Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Sivák <[email protected]> Gerrit-Reviewer: Gilad Chaplik <[email protected]> Gerrit-Reviewer: Liron Aravot <[email protected]> Gerrit-Reviewer: Martin Sivák <[email protected]> Gerrit-Reviewer: Roy Golan <[email protected]> Gerrit-Reviewer: Tomer Saban <[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
