On Thu, Dec 19, 2013 at 10:27:37AM +0800, Hu Tao wrote:
> diff --git a/block.c b/block.c
> index 64e7d22..b901587 100644
> --- a/block.c
> +++ b/block.c
> @@ -3216,6 +3216,19 @@ bool bdrv_can_write_zeroes_with_unmap(BlockDriverState
> *bs)
> return false;
> }
>
> +int bdrv_preallocate(BlockDriverState *bs, int64_t offset, int64_t length)
> +{
> + if (bs->backing_hd) {
> + return -ENOTSUP;
> + }
Depending on the image file format it may be possible to preallocate
metadata while using a backing file. Why prevent this?