qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	dron@redhat.com
Subject: Re: [Qemu-devel] [PATCH v2] blockdev: reset werror/rerror on drive_del
Date: Wed, 5 Jun 2013 16:41:24 +0200	[thread overview]
Message-ID: <20130605144124.GA352@stefanha-thinkpad.muc.redhat.com> (raw)
In-Reply-To: <1370421194-27049-1-git-send-email-stefanha@redhat.com>

On Wed, Jun 05, 2013 at 10:33:14AM +0200, Stefan Hajnoczi wrote:
> Paolo Bonzini <pbonzini@redhat.com> suggested the following test case:
> 
> 1. Launch a guest and wait at the GRUB boot menu:
> 
>   qemu-system-x86_64 -enable-kvm -m 1024 \
>    -drive if=none,cache=none,file=test.img,id=foo,werror=stop,rerror=stop
>    -device virtio-blk-pci,drive=foo,id=virtio0,addr=4
> 
> 2. Hot unplug the device:
> 
>   (qemu) drive_del foo
> 
> 3. Select the first boot menu entry
> 
> Without this patch the guest pauses due to ENOMEDIUM.  The guest is
> stuck in a continuous pause loop since the I/O request is retried and
> fails immediately again when the guest is resumed.
> 
> With this patch the error is reported to the guest.
> 
> Note that this scenario actually happens sometimes during libvirt disk
> hot unplug, where device_del is followed by drive_del.  I/O may still be
> submitted to the drive after drive_del if the guest does not process the
> PCI hot unplug notification.
> 
> Reported-by: Dafna Ron <dron@redhat.com>
> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
> ---
>  blockdev.c      | 4 ++++
>  hmp-commands.hx | 2 ++
>  2 files changed, 6 insertions(+)

Applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

      parent reply	other threads:[~2013-06-05 14:41 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-05  8:33 [Qemu-devel] [PATCH v2] blockdev: reset werror/rerror on drive_del Stefan Hajnoczi
2013-06-05  9:00 ` Kevin Wolf
2013-06-05 11:27   ` Stefan Hajnoczi
2013-06-05 14:41 ` Stefan Hajnoczi [this message]

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=20130605144124.GA352@stefanha-thinkpad.muc.redhat.com \
    --to=stefanha@redhat.com \
    --cc=armbru@redhat.com \
    --cc=dron@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).