backup: simplify non-dirty bits progress processing
commit085bd08e6f32f0d96885ff8e0fa2896c2fabed50
authorVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Thu, 12 Oct 2017 13:53:12 +0000 (12 16:53 +0300)
committerJeff Cody <jcody@redhat.com>
Mon, 18 Dec 2017 15:54:13 +0000 (18 10:54 -0500)
treea27d62835600bdb64a09df9b9cd84b8a3c38d897
parent8cc6dc6215fa2a278fd853a2caca172e43c6263e
backup: simplify non-dirty bits progress processing

Set fake progress for non-dirty clusters in copy_bitmap initialization,
to. It simplifies code and allows further refactoring.

This patch changes user's view of backup progress, but formally it
doesn't changed: progress hops are just moved to the beginning.

Actually it's just a point of view: when do we actually skip clusters?
We can say in the very beginning, that we skip these clusters and do
not think about them later.

Of course, if go through disk sequentially, it's logical to say, that
we skip clusters between copied portions to the left and to the right
of them. But even now copying progress is not sequential because of
write notifiers. Future patches will introduce new backup architecture
which will do copying in several coroutines in parallel, so it will
make no sense to publish fake progress by parts in parallel with
other copying requests.

Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Jeff Cody <jcody@redhat.com>
Message-id: 20171012135313.227864-5-vsementsov@virtuozzo.com
Signed-off-by: Jeff Cody <jcody@redhat.com>
block/backup.c