Skip to content

Commit

Permalink
migration: Create migration/xbzrle.h
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
  • Loading branch information
Juan Quintela committed May 18, 2017
1 parent ed1701c commit 709e3fe
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 6 deletions.
4 changes: 0 additions & 4 deletions include/migration/migration.h
Expand Up @@ -251,10 +251,6 @@ bool migrate_zero_blocks(void);

bool migrate_auto_converge(void);

int xbzrle_encode_buffer(uint8_t *old_buf, uint8_t *new_buf, int slen,
uint8_t *dst, int dlen);
int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen);

int migrate_use_xbzrle(void);
int64_t migrate_xbzrle_cache_size(void);
bool migrate_colo_enabled(void);
Expand Down
1 change: 1 addition & 0 deletions migration/ram.c
Expand Up @@ -35,6 +35,7 @@
#include "qemu/bitmap.h"
#include "qemu/timer.h"
#include "qemu/main-loop.h"
#include "xbzrle.h"
#include "migration/migration.h"
#include "postcopy-ram.h"
#include "exec/address-spaces.h"
Expand Down
2 changes: 1 addition & 1 deletion migration/xbzrle.c
Expand Up @@ -12,7 +12,7 @@
*/
#include "qemu/osdep.h"
#include "qemu/cutils.h"
#include "include/migration/migration.h"
#include "xbzrle.h"

/*
page = zrun nzrun
Expand Down
21 changes: 21 additions & 0 deletions migration/xbzrle.h
@@ -0,0 +1,21 @@
/*
* QEMU live migration
*
* Copyright IBM, Corp. 2008
*
* Authors:
* Anthony Liguori <aliguori@us.ibm.com>
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
*/

#ifndef QEMU_MIGRATION_XBZRLE_H
#define QEMU_MIGRATION_XBZRLE_H

int xbzrle_encode_buffer(uint8_t *old_buf, uint8_t *new_buf, int slen,
uint8_t *dst, int dlen);

int xbzrle_decode_buffer(uint8_t *src, int slen, uint8_t *dst, int dlen);
#endif
2 changes: 1 addition & 1 deletion tests/test-xbzrle.c
Expand Up @@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "qemu/cutils.h"
#include "include/migration/migration.h"
#include "../migration/xbzrle.h"

#define PAGE_SIZE 4096

Expand Down

0 comments on commit 709e3fe

Please sign in to comment.