Received: from eggs.gnu.org ([2001:4830:134:3::10]:51314) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z4iAO-0001WJ-1n for qemu-devel@nongnu.org; Tue, 16 Jun 2015 00:08:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z4iAN-0004bA-24 for qemu-devel@nongnu.org; Tue, 16 Jun 2015 00:08:03 -0400 Date: Tue, 16 Jun 2015 00:07:56 -0400 From: Jeff Cody Message-ID: <20150616040756.GB31232@localhost.localdomain> References: <1432822903-25821-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1432822903-25821-1-git-send-email-pbonzini@redhat.com> Subject: Re: [Qemu-devel] [PATCH] blockdev: no need to drain in qmp_block_commit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: Kevin Wolf , qemu-devel@nongnu.org, "open list:Block layer core" On Thu, May 28, 2015 at 04:21:43PM +0200, Paolo Bonzini wrote: > 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 > --- > blockdev.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/blockdev.c b/blockdev.c > index d506a70..aee0395 100644 > --- a/blockdev.c > +++ b/blockdev.c > @@ -2355,9 +2355,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; > } > -- > 2.4.1 > Thanks, applied to my block tree: https://github.com/codyprime/qemu-kvm-jtc/commits/block -Jeff