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(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 49 ++++++++---------------------------------
1 file changed, 9 insertions(+), 40 deletions(-)
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
Jano