Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
info->ram->page_size = page_size;
info->ram->multifd_bytes = stat64_get(&ram_counters.multifd_bytes);
info->ram->pages_per_second = s->pages_per_second;
- info->ram->precopy_bytes = ram_counters.precopy_bytes;
+ info->ram->precopy_bytes = stat64_get(&ram_counters.precopy_bytes);
info->ram->downtime_bytes = ram_counters.downtime_bytes;
info->ram->postcopy_bytes = stat64_get(&ram_counters.postcopy_bytes);
void ram_transferred_add(uint64_t bytes)
{
if (runstate_is_running()) {
- ram_counters.precopy_bytes += bytes;
+ stat64_add(&ram_counters.precopy_bytes, bytes);
} else if (migration_in_postcopy()) {
stat64_add(&ram_counters.postcopy_bytes, bytes);
} else {
Stat64 normal;
Stat64 postcopy_bytes;
int64_t postcopy_requests;
- uint64_t precopy_bytes;
+ Stat64 precopy_bytes;
int64_t remaining;
Stat64 transferred;
} RAMStats;