Skip to content

Commit

Permalink
migration/block: compare only read blocks against the rate limiter
Browse files Browse the repository at this point in the history
only read_done blocks are in the queued to be flushed to the migration
stream. submitted blocks are still in flight.

Signed-off-by: Peter Lieven <pl@kamp.de>
Message-Id: <1520507908-16743-6-git-send-email-pl@kamp.de>
Reviewed-by: Juan Quintela <quintela@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
  • Loading branch information
plieven authored and dagrh committed Mar 23, 2018
1 parent 4481533 commit b47d1e9
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions migration/block.c
Expand Up @@ -773,8 +773,7 @@ static int block_save_iterate(QEMUFile *f, void *opaque)

/* control the rate of transfer */
blk_mig_lock();
while ((block_mig_state.submitted +
block_mig_state.read_done) * BLOCK_SIZE <
while (block_mig_state.read_done * BLOCK_SIZE <
qemu_file_get_rate_limit(f) &&
block_mig_state.submitted < MAX_PARALLEL_IO &&
(block_mig_state.submitted + block_mig_state.read_done) <
Expand Down

0 comments on commit b47d1e9

Please sign in to comment.