qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Heinz Graalfs <graalfs@linux.vnet.ibm.com>
To: kwolf@redhat.com
Cc: qemu-devel@nongnu.org, stefanha@redhat.com
Subject: [Qemu-devel] drive_del vs. device_del: what should come first?
Date: Tue,  1 Apr 2014 15:55:37 +0200	[thread overview]
Message-ID: <1396360537-12520-1-git-send-email-graalfs@linux.vnet.ibm.com> (raw)

Hi Kevin,

doing a 

     virsh detach-device ...

ends up in the following QEMU monitor commands:

1. device_del ... 
2. drive_del ...

qmp_device_del() performs the device unplug path.
In case of a block device do_drive_del() tries to 
prevent further IO against the host device.

However, bdrv_find() during drive_del() results in 
an error, because the device is already gone. Due to
this error all the bdrv_xxx calls to quiesce the block
driver as well as all other processing is skipped.

Is the sequence that libvirt triggers OK?
Shouldn't drive_del be executed first?

Thanks,
Heinz

             reply	other threads:[~2014-04-01 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-01 13:55 Heinz Graalfs [this message]
2014-04-01 15:48 ` [Qemu-devel] drive_del vs. device_del: what should come first? Markus Armbruster
2014-04-02 14:25   ` Heinz Graalfs
2014-04-02 17:40     ` Markus Armbruster
2014-04-03 15:20       ` Heinz Graalfs
2014-04-11 12:47       ` Heinz Graalfs

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=1396360537-12520-1-git-send-email-graalfs@linux.vnet.ibm.com \
    --to=graalfs@linux.vnet.ibm.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.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 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).