diff -u -r a/block-migration.c b/block-migration.c
--- a/block-migration.c 2014-04-17 08:30:59.000000000 -0500
+++ b/block-migration.c 2014-11-10 12:39:10.727431187 -0600
@@ -628,6 +628,7 @@
{
int ret;
int64_t last_ftell = qemu_ftell(f);
+ int64_t delta_ftell;
DPRINTF("Enter save live iterate submitted %d transferred %d\n",
block_mig_state.submitted, block_mig_state.transferred);
@@ -677,7 +678,8 @@
}
qemu_put_be64(f, BLK_MIG_FLAG_EOS);
- return qemu_ftell(f) - last_ftell;
+ delta_ftell = qemu_ftell(f) - last_ftell;
+ return( (delta_ftell > 0) ? 1 : (delta_ftell < 0) ? -1 : 0 );
}
/* Called with iothread lock taken. */