]> git.proxmox.com Git - mirror_qemu.git/commit
qemu-img: rebase: use backing files' BlockBackend for buffer alignment
authorAndrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Tue, 19 Sep 2023 16:57:59 +0000 (19:57 +0300)
committerKevin Wolf <kwolf@redhat.com>
Tue, 31 Oct 2023 12:51:28 +0000 (13:51 +0100)
commitce8b8f9fe79b09fe6c1d207274b60fcb6a6e08a9
treea4ac8ba56cd239fcfcbef53caae543ce3707322c
parent827171c3180533f4ad0bc338ea166f401bb5d348
qemu-img: rebase: use backing files' BlockBackend for buffer alignment

Since commit bb1c05973cf ("qemu-img: Use qemu_blockalign"), buffers for
the data read from the old and new backing files are aligned using
BlockDriverState (or BlockBackend later on) referring to the target image.
However, this isn't quite right, because buf_new is only being used for
reading from the new backing, while buf_old is being used for both reading
from the old backing and writing to the target.  Let's take that into account
and use more appropriate values as alignments.

Signed-off-by: Andrey Drobyshev <andrey.drobyshev@virtuozzo.com>
Message-ID: <20230919165804.439110-4-andrey.drobyshev@virtuozzo.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qemu-img.c