On Mon, Dec 15, 2025 at 06:59:58PM -0300, Fabiano Rosas wrote:
> MigrationParameters needs to have all of its has_* fields marked as
> true when used as the return of query_migrate_parameters because the
> corresponding QMP command has all of its members non-optional by
> design, despite them being marked as optional in migration.json.
> 
> Extract this code into a function and make it assert if any field is
> missing. With this we ensure future changes will not inadvertently
> leave any parameters missing.
> 
> Note that the block-bitmap-mapping is a special case because the empty
> list is considered a valid value, so it has historically not been
> present in the command's output if it has never been set.
> 
> CC: Kevin Wolf <[email protected]>
> Signed-off-by: Fabiano Rosas <[email protected]>

Reviewed-by: Peter Xu <[email protected]>

-- 
Peter Xu


Reply via email to