From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: anthony@codemonkey.ws
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
qemu-devel@nongnu.org, qemu-stable@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] xen_disk: detach the blkdev before bdrv_delete
Date: Tue, 27 Mar 2012 17:15:32 +0100 [thread overview]
Message-ID: <1332864932-1082-2-git-send-email-stefano.stabellini@eu.citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203271707460.15151@kaball-desktop>
We need to detach the blkdev from the BlockDriverState before calling
bdrv_delete.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
hw/xen_disk.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/xen_disk.c b/hw/xen_disk.c
index 68fa36a..bf06fc1 100644
--- a/hw/xen_disk.c
+++ b/hw/xen_disk.c
@@ -726,6 +726,7 @@ static void blk_disconnect(struct XenDevice *xendev)
if (!blkdev->dinfo) {
/* close/delete only if we created it ourself */
bdrv_close(blkdev->bs);
+ bdrv_detach_dev(blkdev->bs, blkdev);
bdrv_delete(blkdev->bs);
}
blkdev->bs = NULL;
--
1.7.2.5
next prev parent reply other threads:[~2012-03-27 16:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-27 16:14 [Qemu-devel] [PULL 0/2] simple Xen fixes Stefano Stabellini
2012-03-27 16:15 ` [Qemu-devel] [PATCH 1/2] xen_console: ignore console disconnect events from console/0 Stefano Stabellini
2012-03-27 16:15 ` Stefano Stabellini [this message]
2012-03-30 13:12 ` [Qemu-devel] [PULL 0/2] simple Xen fixes Anthony Liguori
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=1332864932-1082-2-git-send-email-stefano.stabellini@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@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).