]> git.ipfire.org Git - thirdparty/qemu.git/commit
block/backup: refactor and tolerate unallocated cluster skipping
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Mon, 29 Apr 2019 09:08:40 +0000 (12:08 +0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 1 Oct 2019 21:58:28 +0000 (16:58 -0500)
commit87851171b4adc456ba6de97e729cf87ace318288
treeab22cf8424730a4ff56559ea7337c6a8691c1c81
parent3f6c00eb618389034a0414ea119665f8cc36b2ca
block/backup: refactor and tolerate unallocated cluster skipping

Split allocation checking to separate function and reduce nesting.
Consider bdrv_is_allocated() fail as allocated area, as copying more
than needed is not wrong (and we do it anyway) and seems better than
fail the whole job. And, most probably we will fail on the next read,
if there are real problem with source.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Message-id: 20190429090842.57910-4-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz <mreitz@redhat.com>
(cherry picked from commit 9eb5a248f3e50c1f034bc6ff4b2f25c8c56515a5)
*prereq for 110571be4e
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
block/backup.c