mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
qemu_domain: Ignore all but SCSI hostdevs in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias()
When retiring QEMU_CAPS_BLOCKDEV_HOSTDEV_SCSI capability the commit removed a bit too much. Previously, all other devices than VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI were ignored in qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias(). But the commit in question removed not only the capability check but also this return early statement. Restore it back. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2129239 Fixes: dc8dbb27d40968c9d9bfad2c6181bccc20c0e44e Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
68e93e3180
commit
a8947db1a4
@ -5596,6 +5596,10 @@ qemuDomainDeviceHostdevDefPostParseRestoreBackendAlias(virDomainHostdevDef *host
|
||||
if (!(parseFlags & VIR_DOMAIN_DEF_PARSE_STATUS))
|
||||
return 0;
|
||||
|
||||
if (hostdev->mode != VIR_DOMAIN_HOSTDEV_MODE_SUBSYS ||
|
||||
hostdev->source.subsys.type != VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI)
|
||||
return 0;
|
||||
|
||||
switch ((virDomainHostdevSCSIProtocolType) scsisrc->protocol) {
|
||||
case VIR_DOMAIN_HOSTDEV_SCSI_PROTOCOL_TYPE_NONE:
|
||||
if (!scsisrc->u.host.src)
|
||||
|
Loading…
x
Reference in New Issue
Block a user