qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v3 5/6] qcow2: implement bdrv_preallocate


From: Stefan Hajnoczi
Subject: Re: [Qemu-devel] [RFC PATCH v3 5/6] qcow2: implement bdrv_preallocate
Date: Fri, 20 Dec 2013 11:19:43 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

On Thu, Dec 19, 2013 at 10:27:40AM +0800, Hu Tao wrote:
> Signed-off-by: Hu Tao <address@hidden>
> ---
>  block/qcow2.c | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/block/qcow2.c b/block/qcow2.c
> index 32cb39f..487a595 100644
> --- a/block/qcow2.c
> +++ b/block/qcow2.c
> @@ -2188,6 +2188,12 @@ static int qcow2_amend_options(BlockDriverState *bs,
>      return 0;
>  }
>  
> +static int qcow2_preallocate(BlockDriverState *bs, int64_t offset,
> +                             int64_t length)
> +{
> +    return bdrv_preallocate(bs->file, offset, length);
> +}

What about qcow2-level preallocation (metadata)?

I'm not sure what the meaning of offset and length are here - are they
supposed to be virtual disk LBAs.  They are being passed through to
bs->file so they actually become physical file offsets.



reply via email to

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