[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH v2 3/7] migration/snapshot: Move RAM_SAVE_FLAG_xxx defines to
From: |
Andrey Gruzdev |
Subject: |
[RFC PATCH v2 3/7] migration/snapshot: Move RAM_SAVE_FLAG_xxx defines to migration/ram.h |
Date: |
Thu, 13 May 2021 01:31:23 +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 ace8ad431c..0359b63dde 100644
--- a/migration/ram.c
+++ b/migration/ram.c
@@ -63,22 +63,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 4833e9fd5b..d6498b651f 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.27.0
- [RFC PATCH v2 0/7] migration/snapshot: External snapshot utility, Andrey Gruzdev, 2021/05/12
- [RFC PATCH v2 6/7] migration/snapshot: Implementation of qemu-snapshot load path, Andrey Gruzdev, 2021/05/12
- [RFC PATCH v2 2/7] migration/snapshot: Introduce qemu_ftell2() routine, Andrey Gruzdev, 2021/05/12
- [RFC PATCH v2 5/7] migration/snapshot: Implementation of qemu-snapshot save path, Andrey Gruzdev, 2021/05/12
- [RFC PATCH v2 3/7] migration/snapshot: Move RAM_SAVE_FLAG_xxx defines to migration/ram.h,
Andrey Gruzdev <=
- [RFC PATCH v2 1/7] migration/snapshot: Introduce qemu-snapshot tool, Andrey Gruzdev, 2021/05/12
- [RFC PATCH v2 7/7] migration/snapshot: Implementation of qemu-snapshot load path in postcopy mode, Andrey Gruzdev, 2021/05/12
- [RFC PATCH v2 4/7] migration/snapshot: Block layer AIO support in qemu-snapshot, Andrey Gruzdev, 2021/05/12