OSDN Git Service

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)
committerMax Reitz <mreitz@redhat.com>
Thu, 10 Oct 2019 08:56:17 +0000 (10:56 +0200)
commit981fb5810aa3f68797ee6e261db338bd78857614
treec50a47fa532b23158b1c770f52a2a906d85b59b6
parentd710cf575ad5fb3ab329204620de45bfe50caa53
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>
block/backup.c