
On Wed, Jan 18, 2023 at 21:52:30 +0800, Jiang Jiacheng wrote:
I think we should just be able to use the existing VIR_MIGRATE_PARAM_COMPRESSION to specify the method. We know whether we're asking for parallel migration from VIR_MIGRATE_PARALLEL flag. We might need to add checks for which compression methods are only allowed with/without VIR_MIGRATE_PARALLEL.
I see, I will try this way and add necessary check for them in next version.
On the other hand, for consistency reasons I think we should add separate VIR_MIGRATE_PARAM_COMPRESSION_ZLIB_LEVEL and VIR_MIGRATE_PARAM_COMPRESSION_ZSTD_LEVEL even though they are the same. The other two compressions methods we currently support (mt and xbzrle) have each their own set of parameters.
If so, shall we keeping using separate virsh migrate options(like --comp-zlib-level and --comp-zstd-level)? Or just use one option (--parallel-comp-level) to pass compression level, according to the compression method we have chosen?
Separate options, please, (i.e., --comp-zlib-level and --comp-zstd-level) to be consistent with the API. Jirka