From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38153) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YRO1S-0008P1-Jm for qemu-devel@nongnu.org; Fri, 27 Feb 2015 11:44:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YRO1R-0006Kb-Ob for qemu-devel@nongnu.org; Fri, 27 Feb 2015 11:44:18 -0500 From: Max Reitz Date: Fri, 27 Feb 2015 11:43:56 -0500 Message-Id: <1425055440-18038-8-git-send-email-mreitz@redhat.com> In-Reply-To: <1425055440-18038-1-git-send-email-mreitz@redhat.com> References: <1425055440-18038-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH v4 07/11] blockdev: Use blk_remove_bs() in do_drive_del() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Markus Armbruster , Stefan Hajnoczi , Paolo Bonzini , Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- blockdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index f198be6..e5f5ebc 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2229,11 +2229,7 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data) } /* quiesce block driver; prevent further io */ - bdrv_drain_all(); - if (bs) { - bdrv_flush(bs); - bdrv_close(bs); - } + blk_remove_bs(blk); /* if we have a device attached to this BlockDriverState * then we need to make the drive anonymous until the device -- 2.1.0