From: Fam Zheng <[email protected]>

Signed-off-by: Fam Zheng <[email protected]>
Message-id: [email protected]
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
---
 block/vmdk.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/block/vmdk.c b/block/vmdk.c
index 9d5a18a..a8db5d9 100644
--- a/block/vmdk.c
+++ b/block/vmdk.c
@@ -1291,12 +1291,12 @@ 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 && !extent->compressed) {
+        if (!extent->compressed) {
             ret |= BDRV_BLOCK_OFFSET_VALID;
             ret |= (offset + (index_in_cluster << BDRV_SECTOR_BITS))
                     & BDRV_BLOCK_OFFSET_MASK;
         }
-
+        *file = extent->file->bs;
         break;
     }
 
-- 
2.7.0


Reply via email to