From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: off by 1 in pci_piix3_xen_ide_unplug Date: Wed, 29 Oct 2014 10:42:58 +0000 Message-ID: <5450C4B2.7080407@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: James Harper , xen-devel Cc: Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On 29/10/14 08:21, James Harper wrote: > 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 I presume this is qemu-upstream, as qemu-trad doesn't have an hw/ide directory. CCing Stefano as the maintainer. For what its worth, I agree that it really should be 4. ~Andrew > > 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@lists.xen.org > http://lists.xen.org/xen-devel