mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: Add migrate options to set parallel compress level
Add migrate options: --compression-zlib-level
--compression-zstd-level
These options are used to set compress level for "zlib"
or "zstd" during parallel migration if the compress method
is specified.
Signed-off-by: Jiang Jiacheng <jiangjiacheng@huawei.com>
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
committed by
Jiri Denemark
parent
150ae3e62b
commit
4ab5591c95
@@ -11076,6 +11076,14 @@ static const vshCmdOptDef opts_migrate[] = {
|
||||
.completer = virshCompleteEmpty,
|
||||
.help = N_("override the destination host name used for TLS verification")
|
||||
},
|
||||
{.name = "comp-zlib-level",
|
||||
.type = VSH_OT_INT,
|
||||
.help = N_("compress level for zlib compression")
|
||||
},
|
||||
{.name = "comp-zstd-level",
|
||||
.type = VSH_OT_INT,
|
||||
.help = N_("compress level for zstd compression")
|
||||
},
|
||||
{.name = NULL}
|
||||
};
|
||||
|
||||
@@ -11288,6 +11296,24 @@ doMigrate(void *opaque)
|
||||
goto save_error;
|
||||
}
|
||||
|
||||
if ((rv = vshCommandOptInt(ctl, cmd, "comp-zlib-level", &intOpt)) < 0) {
|
||||
goto out;
|
||||
} else if (rv > 0) {
|
||||
if (virTypedParamsAddInt(¶ms, &nparams, &maxparams,
|
||||
VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL,
|
||||
intOpt) < 0)
|
||||
goto save_error;
|
||||
}
|
||||
|
||||
if ((rv = vshCommandOptInt(ctl, cmd, "comp-zstd-level", &intOpt)) < 0) {
|
||||
goto out;
|
||||
} else if (rv > 0) {
|
||||
if (virTypedParamsAddInt(¶ms, &nparams, &maxparams,
|
||||
VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL,
|
||||
intOpt) < 0)
|
||||
goto save_error;
|
||||
}
|
||||
|
||||
if ((rv = vshCommandOptULongLong(ctl, cmd, "bandwidth", &ullOpt)) < 0) {
|
||||
goto out;
|
||||
} else if (rv > 0) {
|
||||
|
||||
Reference in New Issue
Block a user