]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: validate: Move qemu-specific LUN disk validation to global validation
authorPeter Krempa <pkrempa@redhat.com>
Tue, 7 Sep 2021 12:01:26 +0000 (14:01 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 9 Sep 2021 08:17:28 +0000 (10:17 +0200)
commit7dee442677e8365de3e9d976c338be5da0481dd9
treec1e402b8d923e4f5f45bf227961ed961221395ef
parent5ccb39616fbe7c66bb93435b20f644f03c34f3fa
conf: validate: Move qemu-specific LUN disk validation to global validation

LUN disks are supported only by VMX and QEMU drivers and the VMX
implementation is a subset of qemu's implementation, thus we can move
the qemu-specific validator to the global validation code providing that
we allow the format to be 'none' (qemu driver always sets 'raw' if it's
not set) and allow disk type 'volume' as a source (qemu always
translates the source, and VMX doesn't implement 'volume' at all).

Moving the code to the global validation allows us to stop calling it
from the qemu specific validation and also deduplicates the checks.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/conf/domain_validate.c
src/conf/domain_validate.h
src/libvirt_private.syms
src/qemu/qemu_domain.c
src/qemu/qemu_domain.h
src/qemu/qemu_driver.c
src/qemu/qemu_validate.c