DumpState: adding total_size and written_size fields

Here, total_size is the size in bytes to be dumped (raw data, which
means before compression), while written_size are bytes handled (raw
size too).

Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <1455772616-8668-9-git-send-email-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Peter Xu 2016-02-18 13:16:53 +08:00 committed by Paolo Bonzini
parent 1fbeff72c2
commit 2264c2c96e
2 changed files with 41 additions and 0 deletions

View file

@ -182,6 +182,15 @@ typedef struct DumpState {
bool has_format; /* whether format is provided */
DumpGuestMemoryFormat format; /* valid only if has_format == true */
QemuThread dump_thread; /* thread for detached dump */
int64_t total_size; /* total memory size (in bytes) to
* be dumped. When filter is
* enabled, this will only count
* those to be written. */
int64_t written_size; /* written memory size (in bytes),
* this could be used to calculate
* how much work we have
* finished. */
} DumpState;
uint16_t cpu_to_dump16(DumpState *s, uint16_t val);