Commit 8feb5db3 authored by Zheng Chuan's avatar Zheng Chuan Committed by zhuyanting
Browse files

migration: update ram_counters for multifd sync packet



Multifd sync will send MULTIFD_FLAG_SYNC flag info to destination, add
these bytes to ram_counters record.

Change-Id: I885166f412f58e74de40ea6ffec1c35e82ae4619
Signed-off-by: default avatarIvan Ren <ivanren@tencent.com>
Suggested-by: default avatarWei Yang <richardw.yang@linux.intel.com>
Message-Id: <1564464816-21804-4-git-send-email-ivanren@tencent.com>
Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
parent 76d7de17
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1085,6 +1085,10 @@ static void multifd_send_sync_main(RAMState *rs)
        p->flags |= MULTIFD_FLAG_SYNC;
        p->pending_job++;
        qemu_file_update_transfer(rs->f, p->packet_len);
        ram_counters.multifd_bytes += p->packet_len;
        ram_counters.transferred += p->packet_len;
        ram_counters.multifd_bytes += p->packet_len;
        ram_counters.transferred += p->packet_len;
        qemu_mutex_unlock(&p->mutex);
        qemu_sem_post(&p->sem);
    }