On 12/19/2012 05:33 AM, Juan Quintela wrote: > It could only return 0 if we only found dirty xbzrle pages that hadn't > changed (i.e. they were written with the same content). We don't care > about that case, it is the same than nothing dirty.
s/than/as/ > > So now the return of the function is how much have it written, nothing s/have/has/ > else. Adjust callers. > > And we also made ram_save_iterate() return the number of transferred > bytes, not the number of transferred pages. > > Signed-off-by: Juan Quintela <quint...@redhat.com> > --- > arch_init.c | 25 +++++++++++++++---------- > 1 file changed, 15 insertions(+), 10 deletions(-) > > static int ram_save_block(QEMUFile *f, bool last_stage) > @@ -432,7 +431,7 @@ static int ram_save_block(QEMUFile *f, bool last_stage) > RAMBlock *block = last_seen_block; > ram_addr_t offset = last_offset; > bool complete_round = false; > - int bytes_sent = -1; > + int bytes_sent = 0; Are we guaranteed that we will never send more than 2G bytes in one call to this function, or should this be changed to int64_t? -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature