On Tue, May 21, 2013 at 06:46:39PM +0200, Paolo Bonzini wrote: > Il 21/05/2013 18:26, Dietmar Maurer ha scritto: > >> Hmm, right. But do we need the bitmap at all? We can just use > >> > bdrv_is_allocated like bdrv_co_do_readv does. > > Does that works with a nbd driver? > > Ah, right. That's the answer.
Yes, the target may not supported allocation info. > > Or does that add another RPC call (slow down)? > > It doesn't work at all. Thus Stefan's patch is fine (except if you > don't use HBitmapIter, there's no advantage in using HBitmap; you can > use qemu/bitmap.h instead). I chose HBitmap because bitmap.h uses the int type instead of uint64_t, which makes it risky to use in the block layer. Stefan