[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 6/9] migration/snap-tool: Move RAM_SAVE_FLAG_xxx defines to m
From: |
Andrey Gruzdev |
Subject: |
[RFC PATCH 6/9] migration/snap-tool: Move RAM_SAVE_FLAG_xxx defines to migration/ram.h |
Date: |
Wed, 17 Mar 2021 19:32:19 +0300 |
Move RAM_SAVE_FLAG_xxx defines from migration/ram.c to migration/ram.h
Signed-off-by: Andrey Gruzdev <andrey.gruzdev@virtuozzo.com>
---
migration/ram.c | 16 ----------------
migration/ram.h | 16 ++++++++++++++++
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/migration/ram.c b/migration/ram.c
index 52537f14ac..d3da0c8208 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -65,22 +65,6 @@
/***********************************************************/
/* ram save/restore */
-/* RAM_SAVE_FLAG_ZERO used to be named RAM_SAVE_FLAG_COMPRESS, it
- * worked for pages that where filled with the same char. We switched
- * it to only search for the zero value. And to avoid confusion with
- * RAM_SSAVE_FLAG_COMPRESS_PAGE just rename it.
- */
-
-#define RAM_SAVE_FLAG_FULL 0x01 /* Obsolete, not used anymore */
-#define RAM_SAVE_FLAG_ZERO 0x02
-#define RAM_SAVE_FLAG_MEM_SIZE 0x04
-#define RAM_SAVE_FLAG_PAGE 0x08
-#define RAM_SAVE_FLAG_EOS 0x10
-#define RAM_SAVE_FLAG_CONTINUE 0x20
-#define RAM_SAVE_FLAG_XBZRLE 0x40
-/* 0x80 is reserved in migration.h start with 0x100 next */
-#define RAM_SAVE_FLAG_COMPRESS_PAGE 0x100
-
static inline bool is_zero_range(uint8_t *p, uint64_t size)
{
return buffer_is_zero(p, size);
diff --git a/migration/ram.h b/migration/ram.h
index 6378bb3ebc..c6bad8bbdf 100644
--- a/migration/ram.h
+++ b/migration/ram.h
@@ -33,6 +33,22 @@
#include "exec/cpu-common.h"
#include "io/channel.h"
+/* RAM_SAVE_FLAG_ZERO used to be named RAM_SAVE_FLAG_COMPRESS, it
+ * worked for pages that where filled with the same char. We switched
+ * it to only search for the zero value. And to avoid confusion with
+ * RAM_SSAVE_FLAG_COMPRESS_PAGE just rename it.
+ */
+
+#define RAM_SAVE_FLAG_FULL 0x01 /* Obsolete, not used anymore */
+#define RAM_SAVE_FLAG_ZERO 0x02
+#define RAM_SAVE_FLAG_MEM_SIZE 0x04
+#define RAM_SAVE_FLAG_PAGE 0x08
+#define RAM_SAVE_FLAG_EOS 0x10
+#define RAM_SAVE_FLAG_CONTINUE 0x20
+#define RAM_SAVE_FLAG_XBZRLE 0x40
+/* 0x80 is reserved in migration.h start with 0x100 next */
+#define RAM_SAVE_FLAG_COMPRESS_PAGE 0x100
+
extern MigrationStats ram_counters;
extern XBZRLECacheStats xbzrle_counters;
extern CompressionStats compression_counters;
--
2.25.1
- [RFC PATCH 0/9] migration/snap-tool: External snapshot utility, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 1/9] migration/snap-tool: Introduce qemu-snap tool, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 2/9] migration/snap-tool: Snapshot image create/open routines for qemu-snap tool, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 3/9] migration/snap-tool: Preparations to run code in main loop context, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 4/9] migration/snap-tool: Introduce qemu_ftell2() routine to qemu-file.c, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 5/9] migration/snap-tool: Block layer AIO support and file utility routines, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 6/9] migration/snap-tool: Move RAM_SAVE_FLAG_xxx defines to migration/ram.h,
Andrey Gruzdev <=
- [RFC PATCH 7/9] migration/snap-tool: Complete implementation of snapshot saving, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 8/9] migration/snap-tool: Implementation of snapshot loading in precopy, Andrey Gruzdev, 2021/03/17
- [RFC PATCH 9/9] migration/snap-tool: Implementation of snapshot loading in postcopy, Andrey Gruzdev, 2021/03/17
- Re: [RFC PATCH 0/9] migration/snap-tool: External snapshot utility, Andrey Gruzdev, 2021/03/29