[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_de
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time |
Date: |
Tue, 22 Mar 2016 23:10:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
On 21/03/2016 18:39, Kevin Wolf wrote:
> > When I wrote my review, I forgot that I expect x-blockdev-del to accept
> > only backends created with blockdev-add. With that, my question is
> > indeed moot.
> >
> > However, I've now tested my expectation, and it turned out to be wrong.
> > I'm inclined to call that a bug.
>
> Yes.
Like this?
diff --git a/blockdev.c b/blockdev.c
index 3eb05d1..0bc7ea2 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -4023,6 +4023,11 @@ void qmp_x_blockdev_del(bool has_id, const char *id,
error_setg(errp, "Cannot find block backend %s", id);
return;
}
+ if (blk_legacy_dinfo(blk)) {
+ error_setg(errp, "Deleting block backend added with drive-add"
+ " is not supported");
+ return;
+ }
if (blk_get_refcnt(blk) > 1) {
error_setg(errp, "Block backend %s is in use", id);
return;
Paolo
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Markus Armbruster, 2016/03/21
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Paolo Bonzini, 2016/03/21
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Markus Armbruster, 2016/03/21
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Paolo Bonzini, 2016/03/21
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Markus Armbruster, 2016/03/21
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Kevin Wolf, 2016/03/22
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Markus Armbruster, 2016/03/22
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Paolo Bonzini, 2016/03/22
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Kevin Wolf, 2016/03/21
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Markus Armbruster, 2016/03/21
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time, Markus Armbruster, 2016/03/23