[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/27] migration: Properly apply migration compression level param
From: |
peterx |
Subject: |
[PULL 02/27] migration: Properly apply migration compression level parameters |
Date: |
Mon, 4 Mar 2024 09:26:09 +0800 |
From: Bryan Zhang <bryan.zhang@BYTEDANCE.COM>
Some glue code was missing, so that using `qmp_migrate_set_parameters`
to set `multifd-zstd-level` or `multifd-zlib-level` did not work. This
commit adds the glue code to fix that.
Signed-off-by: Bryan Zhang <bryan.zhang@bytedance.com>
Link:
https://lore.kernel.org/r/20240301035901.4006936-2-bryan.zhang@bytedance.com
Signed-off-by: Peter Xu <peterx@redhat.com>
---
migration/options.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/migration/options.c b/migration/options.c
index 3e3e0b93b4..1cd3cc7c33 100644
--- a/migration/options.c
+++ b/migration/options.c
@@ -1312,6 +1312,12 @@ static void
migrate_params_test_apply(MigrateSetParameters *params,
if (params->has_multifd_compression) {
dest->multifd_compression = params->multifd_compression;
}
+ if (params->has_multifd_zlib_level) {
+ dest->multifd_zlib_level = params->multifd_zlib_level;
+ }
+ if (params->has_multifd_zstd_level) {
+ dest->multifd_zstd_level = params->multifd_zstd_level;
+ }
if (params->has_xbzrle_cache_size) {
dest->xbzrle_cache_size = params->xbzrle_cache_size;
}
@@ -1447,6 +1453,12 @@ static void migrate_params_apply(MigrateSetParameters
*params, Error **errp)
if (params->has_multifd_compression) {
s->parameters.multifd_compression = params->multifd_compression;
}
+ if (params->has_multifd_zlib_level) {
+ s->parameters.multifd_zlib_level = params->multifd_zlib_level;
+ }
+ if (params->has_multifd_zstd_level) {
+ s->parameters.multifd_zstd_level = params->multifd_zstd_level;
+ }
if (params->has_xbzrle_cache_size) {
s->parameters.xbzrle_cache_size = params->xbzrle_cache_size;
xbzrle_cache_resize(params->xbzrle_cache_size, errp);
--
2.44.0
- [PULL 00/27] Migration next patches, peterx, 2024/03/03
- [PULL 01/27] migration: massage cpr-reboot documentation, peterx, 2024/03/03
- [PULL 02/27] migration: Properly apply migration compression level parameters,
peterx <=
- [PULL 04/27] migration/multifd: Cleanup multifd_recv_sync_main, peterx, 2024/03/03
- [PULL 05/27] io: add and implement QIO_CHANNEL_FEATURE_SEEKABLE for channel file, peterx, 2024/03/03
- [PULL 03/27] tests/migration: Set compression level in migration tests, peterx, 2024/03/03
- [PULL 07/27] io: implement io_pwritev/preadv for QIOChannelFile, peterx, 2024/03/03
- [PULL 08/27] io: fsync before closing a file channel, peterx, 2024/03/03
- [PULL 06/27] io: Add generic pwritev/preadv interface, peterx, 2024/03/03
- [PULL 10/27] migration/ram: Introduce 'mapped-ram' migration capability, peterx, 2024/03/03
- [PULL 11/27] migration: Add mapped-ram URI compatibility check, peterx, 2024/03/03
- [PULL 09/27] migration/qemu-file: add utility methods for working with seekable channels, peterx, 2024/03/03
- [PULL 12/27] migration/ram: Add outgoing 'mapped-ram' migration, peterx, 2024/03/03