On 2017-09-25 17:49, Vladimir Sementsov-Ogievskiy wrote: > I have a patch on list, which adds hbitmap_next_zero function, it may help > https://lists.nongnu.org/archive/html/qemu-devel/2017-02/msg00809.html Hmmm. Sounds good, but (1) I would need to directly access the bitmap instead of the iterator, and (2) I would still need to clear the whole in the iterator... It does sound tempting because I could drop the previous patch, then (and thus wouldn't have to worry about concurrent resetting), but I don't think the whole implementation would be simpler. I'll think about it, but thanks for pointing it out in any case! Max