From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZFCPd-0002FM-4H for qemu-devel@nongnu.org; Tue, 14 Jul 2015 22:27:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZFCPc-000178-B9 for qemu-devel@nongnu.org; Tue, 14 Jul 2015 22:27:09 -0400 From: Jeff Cody Date: Tue, 14 Jul 2015 22:26:54 -0400 Message-Id: <1436927217-383-3-git-send-email-jcody@redhat.com> In-Reply-To: <1436927217-383-1-git-send-email-jcody@redhat.com> References: <1436927217-383-1-git-send-email-jcody@redhat.com> Subject: [Qemu-devel] [PULL for-2.4 2/5] blockdev: no need to drain in qmp_block_commit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-block@nongnu.org Cc: jcody@redhat.com, qemu-devel@nongnu.org From: Paolo Bonzini Draining is not necessary, I/O can happen as soon as the commit coroutine yields. Draining can be necessary before reopening the file for read/write, or while modifying the backing file chain, but that is done separately in bdrv_reopen_multiple or bdrv_close; this particular bdrv_drain_all does nothing for that. Signed-off-by: Paolo Bonzini Reviewed-by: Fam Zheng Reviewed-by: Stefan Hajnoczi Message-id: 1432822903-25821-1-git-send-email-pbonzini@redhat.com Signed-off-by: Jeff Cody --- blockdev.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7fee519..50421c8 100644 --- a/blockdev.c +++ b/blockdev.c @@ -2380,9 +2380,6 @@ void qmp_block_commit(const char *device, aio_context = bdrv_get_aio_context(bs); aio_context_acquire(aio_context); - /* drain all i/o before commits */ - bdrv_drain_all(); - if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_COMMIT_SOURCE, errp)) { goto out; } -- 1.9.3