]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Limit maximum block device I/O tune values
authorMartin Kletzander <mkletzan@redhat.com>
Wed, 20 Apr 2016 14:14:02 +0000 (16:14 +0200)
committerCole Robinson <crobinso@redhat.com>
Wed, 4 May 2016 22:45:50 +0000 (18:45 -0400)
commit7b25be9df4c979f1471f104eb6bb91e4d4a6b0a7
treea08c837ea90d88f3008b7b07bc571e0186ff74d2
parentca9180ad63b4f369880f4f13c0a4be3cb7060248
qemu: Limit maximum block device I/O tune values

The values are currently limited to LLONG_MAX which causes some
problems.  QEMU conveniently changed their maximum to 1e15 (1 PB) which
is enough for some time and we need to adapt to that so that we don't
throw "Unknown error" messages.  Strictly limiting these values actually
fixes some corner case values (off-by-one checks in QEMU probably).

Since values out of the new specified range do not overflow anything,
change the type of error as well.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1317531

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
(cherry picked from commit 2d04f6de77d437fa60361950e5f18fac8c1c922d)
src/qemu/qemu_command.c
src/qemu/qemu_command.h
src/qemu/qemu_driver.c