]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/backup: fix max_transfer handling for copy_range
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Fri, 20 Sep 2019 14:20:42 +0000 (17:20 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 30 Oct 2019 16:34:26 +0000 (11:34 -0500)
commite01ed1a1ae42e023fa8f91c9e3905f4f9c3523a0
tree0db7a2fed23547e561038be26a29f8ab6e4a3f3b
parent416a692e51b8b582407e30046ddcffbbe52ecf77
block/backup: fix max_transfer handling for copy_range

Of course, QEMU_ALIGN_UP is a typo, it should be QEMU_ALIGN_DOWN, as we
are trying to find aligned size which satisfy both source and target.
Also, don't ignore too small max_transfer. In this case seems safer to
disable copy_range.

Fixes: 9ded4a0114968e
Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190920142056.12778-2-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit 981fb5810aa3f68797ee6e261db338bd78857614)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/backup.c