]> git.ipfire.org Git - thirdparty/qemu.git/commit
migration: Add a flag to track block-bitmap-mapping input
authorFabiano Rosas <farosas@suse.de>
Mon, 15 Dec 2025 21:59:55 +0000 (18:59 -0300)
committerPeter Xu <peterx@redhat.com>
Tue, 23 Dec 2025 14:24:34 +0000 (09:24 -0500)
commit47979fce03a65e7bb33e60afc873d055fbf68a6a
tree06422409fb00021d1311e8d76774971a7c4b0fde
parent6ab968d5e99f4eb4b9d1476c88fe2894f20ea69c
migration: Add a flag to track block-bitmap-mapping input

The QAPI converts an empty list on the block-bitmap-mapping input into
a NULL BitmapMigrationNodeAliasList. The empty list is a valid input
for the block-bitmap-mapping option, so commit 3cba22c9ad ("migration:
Fix block_bitmap_mapping migration") started using the
s->parameters.has_block_bitmap_mapping field to tell when the user has
passed in an empty list vs. when no list has been passed at all.

Using s->parameters.has_block_bitmap_mapping field is only possible
because MigrationParameters has had its members made optional due to
historical reasons.

In order to make improvements to the way configuration options are set
for a migration, we'd like to reduce the open-coded usage of the has_*
fields of the global configuration object (s->parameters).

Add a separate boolean to track the status of the block_bitmap_mapping
option.

No functional change intended.

(this was verified to not regress iotest 300, which is the test that
3cba22c9ad refers to)

CC: Kevin Wolf <kwolf@redhat.com>
Acked-by: Peter Xu <peterx@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Link: https://lore.kernel.org/r/20251215220041.12657-10-farosas@suse.de
Signed-off-by: Peter Xu <peterx@redhat.com>
migration/migration-hmp-cmds.c
migration/migration.h
migration/options.c