diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2021-06-24 09:20:40 +0200 |
---|---|---|
committer | Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> | 2021-06-25 14:33:33 +0300 |
commit | 05d5e12b243df43a8a58568edf6a342806879d98 (patch) | |
tree | 537795170644c1db31fb1d9bf577317915077ae1 /cpu.c | |
parent | c6a3e3df3011288c2395cd5755547c91e943b10a (diff) | |
download | qemu-05d5e12b243df43a8a58568edf6a342806879d98.zip qemu-05d5e12b243df43a8a58568edf6a342806879d98.tar.gz qemu-05d5e12b243df43a8a58568edf6a342806879d98.tar.bz2 |
block-copy: streamline choice of copy_range vs. read/write
Put the logic to determine the copy size in a separate function, so
that there is a simple state machine for the possible methods of
copying data from one BlockDriverState to the other.
Use .method instead of .copy_range as in-out argument, and
include also .zeroes as an additional copy method.
While at it, store the common computation of block_copy_max_transfer
into a new field of BlockCopyState, and make sure that we always
obey max_transfer; that's more efficient even for the
COPY_RANGE_READ_WRITE case.
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Message-Id: <20210624072043.180494-3-eesposit@redhat.com>
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Diffstat (limited to 'cpu.c')
0 files changed, 0 insertions, 0 deletions