qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC PATCH v3 2/6] block: add BlockDriver.bdrv_prealloc


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH v3 2/6] block: add BlockDriver.bdrv_preallocate.
Date: Fri, 20 Dec 2013 11:10:30 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]