From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47293) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFpKJ-0006YZ-Az for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:28:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFpKI-0001jb-FX for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:27:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:45188) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFpKI-0001jP-9I for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:27:58 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t0QJRvEh015815 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 26 Jan 2015 14:27:57 -0500 From: Max Reitz Date: Mon, 26 Jan 2015 14:27:34 -0500 Message-Id: <1422300468-16216-8-git-send-email-mreitz@redhat.com> In-Reply-To: <1422300468-16216-1-git-send-email-mreitz@redhat.com> References: <1422300468-16216-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH 07/21] blockdev: Use blk_remove_bs() in do_drive_del() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Kevin Wolf , Markus Armbruster , Stefan Hajnoczi , Max Reitz Signed-off-by: Max Reitz --- blockdev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/blockdev.c b/blockdev.c index fd3f50d..ccf5469 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2285,11 +2285,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