migration: Properly apply migration compression level parameters
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>
This commit is contained in:
parent
87a2848715
commit
b4014a2bf5
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user