On 09.10.23 12:46, Fiona Ebner wrote:
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.eb...@proxmox.com>


Reviewed-by: Vladimir Sementsov-Ogievskiy <vsement...@yandex-team.ru>

--
Best regards,
Vladimir


Reply via email to