OSDN Git Service

backup: Copy only dirty areas
authorMax Reitz <mreitz@redhat.com>
Thu, 1 Aug 2019 17:38:59 +0000 (19:38 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 6 Aug 2019 11:17:01 +0000 (13:17 +0200)
commit4a5b91ca024fc6fd87021c54655af76a35f2ef1e
tree0b5324cec0c47db6a62874b8006027db1ad6b7e9
parent9bb68d34dda9be60335e73e65c8fb61bca035362
backup: Copy only dirty areas

The backup job must only copy areas that the copy_bitmap reports as
dirty.  This is always the case when using traditional non-offloading
backup, because it copies each cluster separately.  When offloading the
copy operation, we sometimes copy more than one cluster at a time, but
we only check whether the first one is dirty.

Therefore, whenever copy offloading is possible, the backup job
currently produces wrong output when the guest writes to an area of
which an inner part has already been backed up, because that inner part
will be re-copied.

Fixes: 9ded4a0114968e98b41494fc035ba14f84cdf700
Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Message-id: 20190801173900.23851-2-mreitz@redhat.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/backup.c