diff options
author | Fam Zheng <famz@redhat.com> | 2016-01-26 11:58:59 +0800 |
---|---|---|
committer | Max Reitz <mreitz@redhat.com> | 2016-02-02 17:50:47 +0100 |
commit | e0f100f57ceee919a7df7af316961b175ffef4e6 (patch) | |
tree | 0bdd07fa3e9be4d3d006918fd92daa76b748c4f0 /block | |
parent | d0a18f10251f515c86dcaec5bdf979a4e07fafc5 (diff) | |
download | qemu-e0f100f57ceee919a7df7af316961b175ffef4e6.zip qemu-e0f100f57ceee919a7df7af316961b175ffef4e6.tar.gz qemu-e0f100f57ceee919a7df7af316961b175ffef4e6.tar.bz2 |
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')
-rw-r--r-- | block/vmdk.c | 4 |
1 files 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; } |