On 31/03/2017 09:55, Peter Lieven wrote: >>> Would it be an idea to introduce an inverse flag live BDRV_BLOCK_NOT_ZERO >>> for cases where we know that there is really DATA and thus can avoid the >>> second callout? >> How would you know that a block is nonzero? > I would trust the metadata. At least for VMDK and QCOW2v3. > Bad idea?
The metadata only tells you that a block is zero, not that it's nonzero. What you are suggesting is really the same as removing the recursion. However, I still haven't understood clearly if it's a QEMU or tmpfs bug; if it's a tmpfs bug your suggestion would not fix tmpfs slowness on raw images. Paolo