[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 32/34] ram: refactor ram_save_block() return val
From: |
Eric Blake |
Subject: |
Re: [Qemu-devel] [PATCH 32/34] ram: refactor ram_save_block() return value |
Date: |
Thu, 20 Dec 2012 16:42:29 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0 |
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 <address@hidden>
> ---
> 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
- [Qemu-devel] [PATCH 19/34] buffered_file: unfold buffered_append in buffered_put_buffer, (continued)
- [Qemu-devel] [PATCH 19/34] buffered_file: unfold buffered_append in buffered_put_buffer, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 12/34] migration: make qemu_fopen_ops_buffered() return void, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 20/34] savevm: New save live migration method: pending, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 23/34] migration: move migration_fd_put_ready(), Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 21/34] migration: move buffered_file.c code into migration.c, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 24/34] migration: Inline qemu_fopen_ops_buffered into migrate_fd_connect, Juan Quintela, 2012/12/19
- Re: [Qemu-devel] [PATCH 00/34] migration thread and queue, Paolo Bonzini, 2012/12/19
- [Qemu-devel] [PATCH 27/34] ram: Add last_sent_block, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 31/34] ram: account the amount of transferred ram better, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 32/34] ram: refactor ram_save_block() return value, Juan Quintela, 2012/12/19
- Re: [Qemu-devel] [PATCH 32/34] ram: refactor ram_save_block() return value,
Eric Blake <=
- [Qemu-devel] [PATCH 33/34] migration: fix qemu_get_fd for BufferedFile, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 29/34] ram: Use memory_region_test_and_clear_dirty, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 34/34] migration: merge QEMUFileBuffered into MigrationState, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 30/34] ram: optimize migration bitmap walking, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 25/34] migration: move migration notifier, Juan Quintela, 2012/12/19
- [Qemu-devel] [PATCH 28/34] memory: introduce memory_region_test_and_clear_dirty, Juan Quintela, 2012/12/19