* [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID
@ 2014-02-24 13:48 Peter Lieven
2014-02-24 14:37 ` Fam Zheng
0 siblings, 1 reply; 4+ messages in thread
From: Peter Lieven @ 2014-02-24 13:48 UTC (permalink / raw)
To: Paolo Bonzini, Kevin Wolf, Stefan Hajnoczi, Fam Zheng,
qemu-devel@nongnu.org
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;
}
Peter
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID
2014-02-24 13:48 [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID Peter Lieven
@ 2014-02-24 14:37 ` Fam Zheng
2014-02-24 16:39 ` Paolo Bonzini
0 siblings, 1 reply; 4+ messages in thread
From: Fam Zheng @ 2014-02-24 14:37 UTC (permalink / raw)
To: Peter Lieven
Cc: Kevin Wolf, Paolo Bonzini, qemu-devel@nongnu.org, Stefan Hajnoczi
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID
2014-02-24 14:37 ` Fam Zheng
@ 2014-02-24 16:39 ` Paolo Bonzini
2014-02-24 20:22 ` Peter Lieven
0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2014-02-24 16:39 UTC (permalink / raw)
To: Fam Zheng, Peter Lieven
Cc: Kevin Wolf, qemu-devel@nongnu.org, Stefan Hajnoczi
Il 24/02/2014 15:37, Fam Zheng ha scritto:
> 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.
Ack.
Paolo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID
2014-02-24 16:39 ` Paolo Bonzini
@ 2014-02-24 20:22 ` Peter Lieven
0 siblings, 0 replies; 4+ messages in thread
From: Peter Lieven @ 2014-02-24 20:22 UTC (permalink / raw)
To: Paolo Bonzini, Fam Zheng
Cc: Kevin Wolf, qemu-devel@nongnu.org, Stefan Hajnoczi
Am 24.02.2014 17:39, schrieb Paolo Bonzini:
> Il 24/02/2014 15:37, Fam Zheng ha scritto:
>> 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.
>
> Ack.
I will send a patch.
Peter
>
> Paolo
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-02-24 20:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-24 13:48 [Qemu-devel] compressed VMDKs and BDRV_BLOCK_OFFSET_VALID Peter Lieven
2014-02-24 14:37 ` Fam Zheng
2014-02-24 16:39 ` Paolo Bonzini
2014-02-24 20:22 ` Peter Lieven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).