Skip to contentSkip to conversation

migration: Add zstd support in multi-thread compression

RFC PATCH In review Zeyu Jin 2 participants 3 messages Nov 27, 2020 – Nov 28, 2020

lore
Share & tools
lore

Zeyu Jin

author
#0 lore raw

RFC PATCH 4/6 migration: Add zstd support in multi-thread compression

This patch enables zstd option in multi-thread compression.

---
 hw/core/qdev-properties-system.c |   2 +-
 migration/ram.c                  | 128 ++++++++++++++++++++++++++++++-
 qapi/migration.json              |   2 +-
 3 files changed, 129 insertions(+), 3 deletions(-)
hw/core/qdev-properties-system.c +1 -1
index d757b2cd70..54760d94b3 100644
@@ -667,7 +667,7 @@ const PropertyInfo qdev_prop_multifd_compression = {
 const PropertyInfo qdev_prop_compress_method = {
     .name = "CompressMethod",
     .description = "multi-thread compression method, "
-                   "zlib",
+                   "zlib/zstd",
     .enum_table = &CompressMethod_lookup,
     .get = qdev_propinfo_get_enum,
     .set = qdev_propinfo_set_enum,
migration/ram.c +127 -1

166 lines not on this page · raw message

qapi/migration.json +1 -1
index d262683a38..ac6d06c683 100644
@@ -536,7 +536,7 @@
 #
 ##
 { 'enum': 'CompressMethod',
-  'data': [ 'zlib' ] }
+  'data': [ 'zlib', { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }
 
 ##
 # @BitmapMigrationBitmapAlias:
Signature · 1 line
2.23.0
#1 lore raw
Quoted 4 lines · Zeyu Jin

This patch enables zstd option in multi-thread compression.

[...]

qapi/migration.json line 542

Quoted 13 lines
qapi/migration.json +1 -1
index d262683a38..ac6d06c683 100644
@@ -536,7 +536,7 @@
 #
 ##
 { 'enum': 'CompressMethod',
-  'data': [ 'zlib' ] }
+  'data': [ 'zlib', { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }
 
 ##
 # @BitmapMigrationBitmapAlias:

Please document the new enum value @zstd.

author
#2 lore raw
Quoted 18 lines · Markus Armbruster
Quoted 4 lines · Zeyu Jin

This patch enables zstd option in multi-thread compression.

[...]

Quoted 11 lines
qapi/migration.json +1 -1
index d262683a38..ac6d06c683 100644
@@ -536,7 +536,7 @@
 #
 ##
 { 'enum': 'CompressMethod',
-  'data': [ 'zlib' ] }
+  'data': [ 'zlib', { 'name': 'zstd', 'if': 'defined(CONFIG_ZSTD)' } ] }
 
Quoted 4 lines

qapi/migration.json line 542

Quoted 2 lines
qapi/migration.json +0 -0
 ##
 # @BitmapMigrationBitmapAlias:

Please document the new enum value @zstd.

I will document that. Thank you.

Quoted 3 lines

.