On Wed, May 18, 2011 at 7:55 AM, Dmitry Konishchev <konishc...@gmail.com> wrote: > So, if you are agreed with the said above, you can accept this patch > and then I'll write an enchancement for it with bdrv_is_allocated() > because it is going to include this patch.
Yes, optimizing is_not_zero() is good. The only additional thing I suggest is adding a comment before the function to document the length constraint. Kevin Wolf is CCed, he's the QEMU block layer maintainer and may have additional thoughts before accepting this patch. Stefan