From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49820) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW3Tb-0002Oa-M9 for qemu-devel@nongnu.org; Mon, 22 Sep 2014 09:16:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XW3TS-0002R7-14 for qemu-devel@nongnu.org; Mon, 22 Sep 2014 09:16:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40166) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XW3TR-0002QY-Og for qemu-devel@nongnu.org; Mon, 22 Sep 2014 09:16:13 -0400 Message-ID: <54202111.2020807@redhat.com> Date: Mon, 22 Sep 2014 15:16:01 +0200 From: Max Reitz MIME-Version: 1.0 References: <1410891148-28849-1-git-send-email-armbru@redhat.com> <1410891148-28849-20-git-send-email-armbru@redhat.com> In-Reply-To: <1410891148-28849-20-git-send-email-armbru@redhat.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 19/23] blockdev: Drop DriveInfo member enable_auto_del List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , qemu-devel@nongnu.org Cc: kwolf@redhat.com, famz@redhat.com, benoit.canet@nodalink.com, stefanha@redhat.com On 16.09.2014 20:12, Markus Armbruster wrote: > Commit 2d246f0 introduced DriveInfo member enable_auto_del to > distinguish DriveInfo created via drive_new() from DriveInfo created > via qmp_blockdev_add(). The latter no longer exist. Drop > enable_auto_del. > > Signed-off-by: Markus Armbruster > --- > blockdev.c | 11 +++-------- > include/sysemu/blockdev.h | 1 - > 2 files changed, 3 insertions(+), 9 deletions(-) I would've liked some comment somewhere about DriveInfo's presence corresponding with the drive having been created through drive_new(), but I can live without, too. > diff --git a/blockdev.c b/blockdev.c > index 0d99be0..e218c59 100644 > --- a/blockdev.c > +++ b/blockdev.c [snip] > @@ -1727,8 +1723,7 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data) > } > bs = blk_bs(blk); > > - dinfo = blk_legacy_dinfo(blk); > - if (dinfo && !dinfo->enable_auto_del) { > + if (!blk_legacy_dinfo(blk)) { > error_report("Deleting device added with blockdev-add" > " is not supported"); > return -1; This doesn't look like a 1-to-1 correspondence. Before this patch, if DriveInfo was not present, the condition was false (actually, it was always false, which is the reason for this patch). Now it's true. It seems like the behavior is now correct but wasn't before... I guess this means patch 18 should be fixed? However, for this patch: Reviewed-by: Max Reitz