aboutsummaryrefslogtreecommitdiff
path: root/block/vmdk.c
diff options
context:
space:
mode:
authorFam Zheng <famz@redhat.com>2016-01-26 11:58:59 +0800
committerMax Reitz <mreitz@redhat.com>2016-02-02 17:50:47 +0100
commite0f100f57ceee919a7df7af316961b175ffef4e6 (patch)
tree0bdd07fa3e9be4d3d006918fd92daa76b748c4f0 /block/vmdk.c
parentd0a18f10251f515c86dcaec5bdf979a4e07fafc5 (diff)
vmdk: Return extent's file in bdrv_get_block_status
Signed-off-by: Fam Zheng <famz@redhat.com> Message-id: 1453780743-16806-13-git-send-email-famz@redhat.com Reviewed-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'block/vmdk.c')
-rw-r--r--block/vmdk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/block/vmdk.c b/block/vmdk.c
index 9d5a18ac05..a8db5d9ec2 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;
}