On 14.02.23 17:29, Fiona Ebner wrote:
[..]
[0]: Is there a good way to peek the iterator without doing something
like the following (we do know the offset from last time in
mirror_iteration(), so that is not an issue)?
offset_from_last_time = bdrv_dirty_iter_next(s->dbi);
...other stuff...
peek = bdrv_dirty_iter_next(s->dbi);
/* Get back to the previous state. */
bdrv_set_dirty_iter(s->dbi, offset_from_last_time);
check = bdrv_dirty_iter_next(s->dbi);
assert(check == offset_from_before); // just to be sure
I think, that this all should be refactored to use bdrv_dirty_bitmap_next_dirty_area() and keep the
"current_offset" instead of "dbi" in MirrorBlockJob. This way further changes
will be simpler.
--
Best regards,
Vladimir