compressed VMDKs and BDRV_BLOCK_OFFSET_VALID
Hi,
I wonder if the current output of get_block_status for compressed VMDKs is correct or if we need this patch?:
block/vmdk.c +1 -1
@@ -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; }
Peter
Quoted 10 lines · Peter Lieven
Hi,
I wonder if the current output of
get_block_statusfor compressed VMDKs is correct or if we need this patch?:block/vmdk.c +0
-0
block/vmdk.c static int64_t coroutine_fn vmdk_co_get_block_status(BlockDriverState *bs, · line 1152
Quoted 8 lines
block/vmdk.c +1
-1@@ -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
Il 24/02/2014 15:37, Fam Zheng ha scritto:
Quoted 6 lines · Peter Lieven
Quoted 5 lines
Hi,
I wonder if the current output of
get_block_statusfor compressed VMDKs is correct or if we need this patch?:
Quoted 16 lines
block/vmdk.c static int64_t coroutine_fn vmdk_co_get_block_status(BlockDriverState *bs, · line 1152
Quoted 13 lines
block/vmdk.c +1
-1@@ -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.
Ack.
Paolo
Am 24.02.2014 17:39, schrieb Paolo Bonzini:
Quoted 24 lines
Il 24/02/2014 15:37, Fam Zheng ha scritto:
Quoted 6 lines · Peter Lieven
Quoted 5 lines
Hi,
I wonder if the current output of
get_block_statusfor compressed VMDKs is correct or if we need this patch?:Quoted 16 lines
block/vmdk.c static int64_t coroutine_fn vmdk_co_get_block_status(BlockDriverState *bs, · line 1152
Quoted 13 lines
block/vmdk.c +1
-1@@ -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.
Quoted 1 line
Ack.
I will send a patch.
Peter
Quoted 4 lines
Paolo