From patchwork Thu Jul 2 09:19:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Hajnoczi X-Patchwork-Id: 490532 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 60E061402A0 for ; Thu, 2 Jul 2015 19:24:09 +1000 (AEST) Received: from localhost ([::1]:35470 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAaj1-0000Cr-Dh for incoming@patchwork.ozlabs.org; Thu, 02 Jul 2015 05:24:07 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53638) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAafG-0001Tz-Fo for qemu-devel@nongnu.org; Thu, 02 Jul 2015 05:20:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAafF-0000G4-CD for qemu-devel@nongnu.org; Thu, 02 Jul 2015 05:20:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAafF-0000Fy-7I for qemu-devel@nongnu.org; Thu, 02 Jul 2015 05:20:13 -0400 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id E73F3374A11; Thu, 2 Jul 2015 09:20:12 +0000 (UTC) Received: from localhost (ovpn-112-49.ams2.redhat.com [10.36.112.49]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t629KAAI018060; Thu, 2 Jul 2015 05:20:12 -0400 From: Stefan Hajnoczi To: Date: Thu, 2 Jul 2015 10:19:36 +0100 Message-Id: <1435828789-9647-5-git-send-email-stefanha@redhat.com> In-Reply-To: <1435828789-9647-1-git-send-email-stefanha@redhat.com> References: <1435828789-9647-1-git-send-email-stefanha@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Peter Maydell , Stefan Hajnoczi , Paolo Bonzini Subject: [Qemu-devel] [PULL 04/17] blockdev: no need to drain+flush in hmp_drive_del X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Paolo Bonzini bdrv_close already does that, and in fact hmp_drive_del would need another drain after the flush (which bdrv_close does). So remove the duplication. Signed-off-by: Paolo Bonzini Reviewed-by: Alberto Garcia Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Message-id: 1432822629-25401-1-git-send-email-pbonzini@redhat.com Signed-off-by: Stefan Hajnoczi --- blockdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index b354676..4d5e016 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2167,9 +2167,6 @@ void hmp_drive_del(Monitor *mon, const QDict *qdict) return; } - /* quiesce block driver; prevent further io */ - bdrv_drain_all(); - bdrv_flush(bs); bdrv_close(bs); /* if we have a device attached to this BlockDriverState