From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55488) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy9Lt-0007X7-9a for qemu-devel@nongnu.org; Thu, 28 May 2015 21:44:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy9Ls-0005TT-Hm for qemu-devel@nongnu.org; Thu, 28 May 2015 21:44:49 -0400 Date: Thu, 28 May 2015 21:44:41 -0400 (EDT) From: Fam Zheng Message-ID: <407042981.6042811.1432863881730.JavaMail.zimbra@redhat.com> In-Reply-To: <1432822903-25821-1-git-send-email-pbonzini@redhat.com> References: <1432822903-25821-1-git-send-email-pbonzini@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 , jcody@redhat.com, qemu-devel@nongnu.org, "open list:Block layer core" ----- Original Message ----- > 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(); > - Reviewed-by: Fam Zheng > if (bdrv_op_is_blocked(bs, BLOCK_OP_TYPE_COMMIT_SOURCE, errp)) { > goto out; > } > -- > 2.4.1 > > >