From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aieIZ-0002ki-FF for qemu-devel@nongnu.org; Wed, 23 Mar 2016 04:37:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aieIU-0005Nu-Fm for qemu-devel@nongnu.org; Wed, 23 Mar 2016 04:37:51 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49734) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aieIU-0005Np-Ae for qemu-devel@nongnu.org; Wed, 23 Mar 2016 04:37:46 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id F012783F44 for ; Wed, 23 Mar 2016 08:37:45 +0000 (UTC) From: Markus Armbruster References: <1456151945-11225-1-git-send-email-pbonzini@redhat.com> <1456151945-11225-4-git-send-email-pbonzini@redhat.com> <87k2kvzu0z.fsf@blackfin.pond.sub.org> <56F01F8A.2090902@redhat.com> <87shzj68n2.fsf@blackfin.pond.sub.org> <20160321173957.GC4985@noname.redhat.com> <56F1C2D3.3050904@redhat.com> Date: Wed, 23 Mar 2016 09:37:43 +0100 In-Reply-To: <56F1C2D3.3050904@redhat.com> (Paolo Bonzini's message of "Tue, 22 Mar 2016 23:10:27 +0100") Message-ID: <87a8lpd1yg.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 3/3] block: remove legacy_dinfo at blk_detach_dev time List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , qemu-devel@nongnu.org, Max Reitz Paolo Bonzini writes: > 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; Matches hmp_drive_del(). Reviewed-by: Markus Armbruster