All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: James Harper <james@ejbdigital.com.au>,
	xen-devel <xen-devel@lists.xensource.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: off by 1 in pci_piix3_xen_ide_unplug
Date: Wed, 29 Oct 2014 10:42:58 +0000	[thread overview]
Message-ID: <5450C4B2.7080407@citrix.com> (raw)
In-Reply-To: <cc20807d1e9f4d7dbf2b52075ff56f5e@HKXPR04MB0390.apcprd04.prod.outlook.com>

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

  reply	other threads:[~2014-10-29 10:42 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-29  8:21 off by 1 in pci_piix3_xen_ide_unplug James Harper
2014-10-29 10:42 ` Andrew Cooper [this message]
2014-10-29 11:55   ` Stefano Stabellini
2014-10-29 20:38     ` James Harper
2014-10-29 22:07       ` Stefano Stabellini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5450C4B2.7080407@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=james@ejbdigital.com.au \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.