]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Set limits only when explicitly asked to do so
authorAndrea Bolognani <abologna@redhat.com>
Tue, 2 Mar 2021 17:20:47 +0000 (18:20 +0100)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 8 Mar 2021 21:41:40 +0000 (22:41 +0100)
commitc2180c2fd695ae547202da1394dcc2c0bb4e0937
treeb5f0704ef2b92d6b550649f1d49258d4e67ad8ab
parente098340cc4080bfd8fcdde54f37f2655027f23cf
qemu: Set limits only when explicitly asked to do so

The current code is written under the assumption that, for all
limits except the core size, asking for the limit to be set to
zero is a no-op, and so the operation is performed
unconditionally.

While this is the behavior we want for the QEMU driver, the
virCommand and virProcess facilities are generic, and should not
implement this kind of policy: asking for a limit to be set to
zero should result in that limit being set to zero every single
time.

Add some checks in the QEMU driver, effectively moving the
policy where it belongs.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_domain.c
src/qemu/qemu_migration.c
src/qemu/qemu_process.c