[libvirt] [PATCH] blkdeviotune: check for overflow when parsing XML

2014-08-26 Thread Erik Skultety
According to docs/schemas/domaincommon.rng and _virDomainBlockIoTuneInfo all the iotune values are interpreted as unsigned long long, however according to qemu_monitor_json.c, qemu silently truncates numbers larger than LLONG_MAX. There's really not much of a usage for such large numbers anyway

Re: [libvirt] [PATCH] blkdeviotune: check for overflow when parsing XML

2014-08-26 Thread Martin Kletzander
On Tue, Aug 26, 2014 at 10:17:22AM +0200, Erik Skultety wrote: According to docs/schemas/domaincommon.rng and _virDomainBlockIoTuneInfo all the iotune values are interpreted as unsigned long long, however according to qemu_monitor_json.c, qemu silently truncates numbers larger than LLONG_MAX.

Re: [libvirt] [PATCH] blkdeviotune: check for overflow when parsing XML

2014-08-26 Thread Erik Skultety
Thank you very much for review. You're right, except for the part about adding a test case I think, it's fine to do it locally, but you can't predict data type sizes on all architectures, so in terms of creating a static XML description, you can't rely on a specific number being long/short