Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
migration: Use qemu_file_transferred_noflush() for block migration.
We only care about the amount of bytes transferred.  Flushing is done
by the system somewhere else.

Reviewed-by: Fabiano Rosas <farosas@suse.de>
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-ID: <20230530183941.7223-4-quintela@redhat.com>
Signed-off-by: Juan Quintela <quintela@redhat.com>
  • Loading branch information
Juan Quintela committed Jun 22, 2023
1 parent d8badc3 commit aa0fcb4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions migration/block.c
Expand Up @@ -748,7 +748,7 @@ static int block_save_setup(QEMUFile *f, void *opaque)
static int block_save_iterate(QEMUFile *f, void *opaque)
{
int ret;
uint64_t last_bytes = qemu_file_transferred(f);
uint64_t last_bytes = qemu_file_transferred_noflush(f);

trace_migration_block_save("iterate", block_mig_state.submitted,
block_mig_state.transferred);
Expand Down Expand Up @@ -800,7 +800,7 @@ static int block_save_iterate(QEMUFile *f, void *opaque)
}

qemu_put_be64(f, BLK_MIG_FLAG_EOS);
uint64_t delta_bytes = qemu_file_transferred(f) - last_bytes;
uint64_t delta_bytes = qemu_file_transferred_noflush(f) - last_bytes;
return (delta_bytes > 0);
}

Expand Down

0 comments on commit aa0fcb4

Please sign in to comment.