From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YStC1-0000qg-7M for qemu-devel@nongnu.org; Tue, 03 Mar 2015 15:13:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YStC0-00082H-CY for qemu-devel@nongnu.org; Tue, 03 Mar 2015 15:13:25 -0500 From: Max Reitz Date: Tue, 3 Mar 2015 15:13:05 -0500 Message-Id: <1425413591-31413-8-git-send-email-mreitz@redhat.com> In-Reply-To: <1425413591-31413-1-git-send-email-mreitz@redhat.com> References: <1425413591-31413-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH v5 07/13] 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 56498ea..546acfe 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2224,11 +2224,7 @@ int hmp_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