[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] off by 1 in pci_piix3_xen_ide_unplug


  • To: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
  • From: James Harper <james@xxxxxxxxxxxxxxxxx>
  • Date: Wed, 29 Oct 2014 08:21:30 +0000
  • Accept-language: en-AU, en-US
  • Delivery-date: Wed, 29 Oct 2014 08:21:45 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>
  • Thread-index: Ac/zTaHbFcwhKqthQ3aiJ7jvSL69Cw==
  • Thread-topic: off by 1 in pci_piix3_xen_ide_unplug

It seems that qemu isn't unplugging all my disks, leaving my /dev/xvdd plugged 
in, with obvious consequences.

pci_piix3_xen_ide_unplug appears to only be counting to disk < 3, when it 
should be <= 3 or < 4.

Where do qemu patches go?

James

diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 574b9c1..b6b30a4 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -175,7 +175,7 @@ int pci_piix3_xen_ide_unplug(DeviceState *dev)

     pci_ide = PCI_IDE(dev);

-    for (; i < 3; i++) {
+    for (; i < 4; i++) {
         di = drive_get_by_index(IF_IDE, i);
         if (di != NULL && !di->media_cd) {
             BlockBackend *blk = blk_by_legacy_dinfo(di);

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.