Skip to contentSkip to conversation

block/vmdk: do not report file offset for compressed extents

PATCH Applied Peter Lieven 2 participants 2 messages Feb 27, 2014 – Feb 28, 2014 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 block/vmdk: do not report file offset for compressed extents

---
 block/vmdk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
block/vmdk.c +1 -1
index ff6f5ee..5fa29b0 100644
@@ -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;
         }
 
Signature · 1 line
1.7.9.5