Martin Sivák has posted comments on this change. Change subject: engine: Use proper units in Storage QoS when talking to VDSM ......................................................................
Patch Set 1: (2 comments) http://gerrit.ovirt.org/#/c/33906/1/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 389: // build map Line 390: Map<String, Integer> ioTuneMap = new HashMap<>(); Line 391: if (storageQos.getMaxThroughput() != null) { Line 392: // Convert MiB/s to B/s vdsm is expecting Line 393: ioTuneMap.put(VdsProperties.TotalBytesSec, storageQos.getMaxThroughput() * 1024 * 1024); > in other words we should use long Dos not help. The whole structure uses Integers all the way up. I actually tried to change that, but then I realized that such speeds are not real and XML-RPC does not support higher numbers than 2^31 anyway. So we would have to convert everything to String. Line 394: } Line 395: if (storageQos.getMaxReadThroughput() != null) { Line 396: // Convert MiB/s to B/s vdsm is expecting Line 397: Line 389: // build map Line 390: Map<String, Integer> ioTuneMap = new HashMap<>(); Line 391: if (storageQos.getMaxThroughput() != null) { Line 392: // Convert MiB/s to B/s vdsm is expecting Line 393: ioTuneMap.put(VdsProperties.TotalBytesSec, storageQos.getMaxThroughput() * 1024 * 1024); > this overflows It does, but I have not heard about hard drive with 1 GB/s throughput yet. And it will be at about 2,000 MB/s (2^31) speed (2 GB/s). Line 394: } Line 395: if (storageQos.getMaxReadThroughput() != null) { Line 396: // Convert MiB/s to B/s vdsm is expecting Line 397: -- To view, visit http://gerrit.ovirt.org/33906 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I2644e9e029c8b6ebe4b5b7626f7b1ed6b6b5aea4 Gerrit-PatchSet: 1 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: Vojtech Szocs <[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
