Commit 32b05495 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Dr. David Alan Gilbert
Browse files

migration: use save_page_use_compression in flush_compressed_data



It avoids to touch compression locks if xbzrle and compression
are both enabled

Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@tencent.com>
Reviewed-by: default avatarJuan Quintela <quintela@redhat.com>
Message-Id: <20180906070101.27280-4-xiaoguangrong@tencent.com>
Signed-off-by: default avatarJuan Quintela <quintela@redhat.com>
Signed-off-by: default avatarDr. David Alan Gilbert <dgilbert@redhat.com>
parent 76e03000
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1932,11 +1932,13 @@ update_compress_thread_counts(const CompressParam *param, int bytes_xmit)
    compression_counters.pages++;
}

static bool save_page_use_compression(RAMState *rs);

static void flush_compressed_data(RAMState *rs)
{
    int idx, len, thread_count;

    if (!migrate_use_compression()) {
    if (!save_page_use_compression(rs)) {
        return;
    }
    thread_count = migrate_compress_threads();