Fiona Ebner 7b32ad2242 block/mirror: determine copy_to_target only once
In preparation to allow changing the copy_mode via QMP. When running
in an iothread, it could be that copy_mode is changed from the main
thread in between reading copy_mode in bdrv_mirror_top_pwritev() and
reading copy_mode in bdrv_mirror_top_do_write(), so they might end up
disagreeing about whether copy_to_target is true or false. Avoid that
scenario by determining copy_to_target only once and passing it to
bdrv_mirror_top_do_write() as an argument.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>
Message-ID: <20231031135431.393137-5-f.ebner@proxmox.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-10-31 18:20:29 +01:00
..
2023-09-08 13:08:52 +03:00
2023-09-21 09:05:10 -04:00
2023-10-20 08:51:41 +02:00
2023-10-20 08:51:41 +02:00
2023-05-30 17:37:26 +02:00
2023-10-20 08:51:41 +02:00
2023-10-20 08:51:41 +02:00
2023-10-20 08:51:41 +02:00
2023-10-20 08:51:41 +02:00
2023-10-20 08:51:41 +02:00