[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID
From: |
Fam Zheng |
Subject: |
Re: [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID |
Date: |
Mon, 24 Feb 2014 22:37:35 +0800 |
User-agent: |
Mutt/1.5.22 (2013-10-16) |
On Mon, 02/24 14:48, Peter Lieven wrote:
> Hi,
>
> I wonder if the current output of get_block_status for compressed VMDKs is
> correct or
> if we need this patch?:
>
> diff --git a/block/vmdk.c b/block/vmdk.c
> index ff6f5ee..5fa29b0 100644
> --- a/block/vmdk.c
> +++ b/block/vmdk.c
> @@ -1146,7 +1146,7 @@ static int64_t coroutine_fn
> vmdk_co_get_block_status(BlockDriverState *bs,
> break;
> case VMDK_OK:
> ret = BDRV_BLOCK_DATA;
> - if (extent->file == bs->file) {
> + if (extent->file == bs->file && !extent->compressed) {
> ret |= BDRV_BLOCK_OFFSET_VALID | offset;
> }
>
Yes, I think you are right. The output shouldn't contain offset for compressed
extents.
Fam