diff options
author | Fiona Ebner <f.ebner@proxmox.com> | 2023-10-31 14:54:25 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2023-10-31 18:20:29 +0100 |
commit | 7b32ad2242d6bcb1d5840466bf846fada8ca42e8 (patch) | |
tree | 5b05081e1d64e35490b87b6828e2ce40c6aa7ac9 /fsdev/qemu-fsdev.c | |
parent | 058cfca5645a9ed7cb2bdb77d15f2eacaf343694 (diff) | |
download | qemu-7b32ad2242d6bcb1d5840466bf846fada8ca42e8.zip qemu-7b32ad2242d6bcb1d5840466bf846fada8ca42e8.tar.gz qemu-7b32ad2242d6bcb1d5840466bf846fada8ca42e8.tar.bz2 |
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>
Diffstat (limited to 'fsdev/qemu-fsdev.c')
0 files changed, 0 insertions, 0 deletions