aboutsummaryrefslogtreecommitdiff
path: root/target-s390x/ioinst.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-02-12 10:37:15 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2013-02-12 16:26:44 -0600
commit6aaa9dae8059633d52ddcd0622de1a2700fc58a8 (patch)
tree93ac37ecfebab58ce862c51a8550597219ef3950 /target-s390x/ioinst.h
parentad55ab42d494c5f4ebc5199c5c9db473b7d5fbf9 (diff)
block-migration: fix pending() and iterate() return values
The return value of .save_live_pending() is the number of bytes remaining. This is just an estimate because we do not know how many blocks will be dirtied by the running guest. Currently our return value for .save_live_pending() is wrong because it includes dirty blocks but not in-flight bdrv_aio_readv() requests or unsent blocks. Crucially, it also doesn't include the bulk phase where the entire device is transferred - therefore we risk completing block migration before all blocks have been transferred! The return value of .save_live_iterate() is the number of bytes transferred this iteration. Currently we return whether there are bytes remaining, which is incorrect. Move the bytes remaining calculation into .save_live_pending() and really return the number of bytes transferred this iteration in .save_live_iterate(). Also fix the %ld format specifier which was used for a uint64_t argument. PRIu64 must be use to avoid warnings on 32-bit hosts. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Juan Quintela <quintela@redhat.com> Message-id: 1360661835-28663-3-git-send-email-stefanha@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'target-s390x/ioinst.h')
0 files changed, 0 insertions, 0 deletions