Skip to content

Commit

Permalink
blockdev: no need to drain in qmp_block_commit
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Message-id: [email protected]
Signed-off-by: Jeff Cody <[email protected]>
  • Loading branch information
bonzini authored and codyprime committed Jul 15, 2015
1 parent 4c0cbd6 commit 299bf09
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions blockdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 299bf09

Please sign in to comment.