From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56623) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKtEX-00047G-Qp for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:38:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YKtEX-0005UX-2a for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:38:57 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33621) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YKtEW-0005Tf-SR for qemu-devel@nongnu.org; Mon, 09 Feb 2015 13:38:57 -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 t19IcuMi008821 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 9 Feb 2015 13:38:56 -0500 From: Max Reitz Date: Mon, 9 Feb 2015 13:38:31 -0500 Message-Id: <1423507124-29809-10-git-send-email-mreitz@redhat.com> In-Reply-To: <1423507124-29809-1-git-send-email-mreitz@redhat.com> References: <1423507124-29809-1-git-send-email-mreitz@redhat.com> Subject: [Qemu-devel] [PATCH v2 09/22] 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 , Paolo Bonzini , Stefan Hajnoczi , 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 75baf16..3dfb5a2 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2281,11 +2281,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