From e0f100f57ceee919a7df7af316961b175ffef4e6 Mon Sep 17 00:00:00 2001 From: Fam Zheng Date: Tue, 26 Jan 2016 11:58:59 +0800 Subject: vmdk: Return extent's file in bdrv_get_block_status Signed-off-by: Fam Zheng Message-id: 1453780743-16806-13-git-send-email-famz@redhat.com Reviewed-by: Max Reitz Signed-off-by: Max Reitz --- block/vmdk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'block/vmdk.c') 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; } -- cgit v1.2.3