Il 21/05/2013 15:34, Stefan Hajnoczi ha scritto: > /** > * hbitmap_iter_init: > [...] > * position of the iterator is also okay. However, concurrent resetting of > * bits can lead to unexpected behavior if the iterator has not yet reached > * those bits. > */ > void hbitmap_iter_init(HBitmapIter *hbi, const HBitmap *hb, uint64_t first); > > This worries me. We would initialize the bitmap to all 1s. Backing up > a cluster resets the bit. But the documentation says it is not safe to > reset bits while iterating?
Hmm, right. But do we need the bitmap at all? We can just use bdrv_is_allocated like bdrv_co_do_readv does. The code has a comment: > + /* immediately set bitmap (avoid coroutine race) */ > + hbitmap_set(job->bitmap, start, 1); but wouldn't this be avoided anyway, because of the mutual exclusion between overlapping requests? Paolo