Re: [Qemu-devel] [PATCH] qemu-img: Speed up comparing empty/zero images

2016-01-18 Thread Kevin Wolf
Am 13.01.2016 um 09:37 hat Fam Zheng geschrieben: > Two empty raw files are always compared by actually reading data even if > there is no data, because BDRV_BLOCK_ZERO is considered "allocated" in > bdrv_is_allocated_above(). That is inefficient. > > Use bdrv_get_block_status_above() for more

[Qemu-devel] [PATCH] qemu-img: Speed up comparing empty/zero images

2016-01-13 Thread Fam Zheng
Two empty raw files are always compared by actually reading data even if there is no data, because BDRV_BLOCK_ZERO is considered "allocated" in bdrv_is_allocated_above(). That is inefficient. Use bdrv_get_block_status_above() for more information, and skip the consecutive zero sectors. This

Re: [Qemu-devel] [PATCH] qemu-img: Speed up comparing empty/zero images

2016-01-13 Thread Paolo Bonzini
On 13/01/2016 09:37, Fam Zheng wrote: > Two empty raw files are always compared by actually reading data even if > there is no data, because BDRV_BLOCK_ZERO is considered "allocated" in > bdrv_is_allocated_above(). That is inefficient. > > Use bdrv_get_block_status_above() for more