On Fri, Oct 30, 2026 at 02:06:09AM +0100, Denis V. Lunev wrote: > From: Denis V. Lunev <[email protected]> > > block_copy_reset_unallocated() and block_copy_calculate_zero_bitmap() > are both one step of the same scan and differ only in what they do with > the answer. Fold them into block_copy_prescan(), which drops unallocated > clusters from copy_bitmap while skip_unallocated is set, so > backup_scan_source() loses its per-mode branch. > > sync=top now walks the dirty areas the way full and bitmap do, so it no > longer queries what copy-before-write has already copied during the > scan. A failed query still fails sync=top, as nothing else can tell > which clusters to skip, and still leaves the area to be copied as data > otherwise. > > Suggested-by: Vladimir Sementsov-Ogievskiy <[email protected]> > Signed-off-by: Denis V. Lunev <[email protected]> > CC: Vladimir Sementsov-Ogievskiy <[email protected]> > CC: John Snow <[email protected]> > CC: Andrey Drobyshev <[email protected]> > --- > block/backup.c | 7 +---- > block/block-copy.c | 63 ++++++++++++++------------------------ > include/block/block-copy.h | 9 ++---- > 3 files changed, 27 insertions(+), 52 deletions(-)
Reviewed-by: Eric Blake <[email protected]> -- Eric Blake, Principal Software Engineer Red Hat, Inc. Virtualization: qemu.org | libguestfs.org
