[pve-devel] [PATCH 9/9] implement virtio-scsi multiqueues hotplug

Alexandre Derumier aderumier at odiso.com
Fri Jan 16 11:01:01 CET 2015


Signed-off-by: Alexandre Derumier <aderumier at odiso.com>
---
 PVE/QemuServer.pm |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm
index 3d3f4fe..f44526b 100644
--- a/PVE/QemuServer.pm
+++ b/PVE/QemuServer.pm
@@ -3207,6 +3207,7 @@ sub vm_deviceplug {
         my $pciaddr = print_pci_addr($deviceid);
         my $devicefull = "$scsihw,id=$deviceid$pciaddr";
 	$devicefull .= ",iothread=iothread-$deviceid" if $device->{iothread};
+	$devicefull .= ",num_queues=$device->{queues}" if $device->{queues};
 
 	qemu_iothread_add($vmid, $deviceid, $device);
         qemu_deviceadd($vmid, $devicefull);
@@ -3427,7 +3428,7 @@ sub qemu_deletescsihw {
     my $controller = find_scsihw_controller($conf, $device);
     my $scsihwid = "scsihw$controller";
 
-    if($conf->{scsihw} && $conf->{scsihw} =~ m/^virtio-scsi-pci/ && $device->{iothread}){
+    if ($conf->{scsihw} && $conf->{scsihw} =~ m/^virtio-scsi-pci/ && ($device->{iothread} || $device->{queues})) {
 	vm_deviceunplug($vmid, $conf, $scsihwid);
 	return 1;
     }
-- 
1.7.10.4




More information about the pve-devel mailing list