[libvirt] [PATCH 4/4] qemu: hotplug: Merge virtio and non-virtio disk unplug code

Ján Tomko jtomko at redhat.com
Fri Mar 15 14:56:23 UTC 2019


On Fri, Mar 15, 2019 at 03:44:58PM +0100, Peter Krempa wrote:
>The functions do basically exactly the same thing modulo few checks.
>In case of virtio disks we check that the device is not multifunction as
>that can't be unplugged at once. In case of USB and SCSI disks we
>checked that no active block job is running.
>
>The check for running blockjobs should have also been done for virtio
>disks. By moving the multifunction check into the common function we fix
>this case and also simplify the code.
>
>Signed-off-by: Peter Krempa <pkrempa at redhat.com>
>---
> src/qemu/qemu_hotplug.c | 49 ++++++++---------------------------------
> 1 file changed, 9 insertions(+), 40 deletions(-)
>

Reviewed-by: Ján Tomko <jtomko at redhat.com>

Jano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190315/3fad488b/attachment-0001.sig>


More information about the libvir-list mailing list