From a03967321235d8ddf2cdf1db749a5a7109ab7451 Mon Sep 17 00:00:00 2001 Message-Id: In-Reply-To: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com> References: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com> From: Fam Zheng Date: Thu, 4 Dec 2014 00:05:09 -0600 Subject: [CHANGE 15/31] block/vmdk: do not report file offset for compressed extents To: rhvirt-patches@redhat.com, jen@redhat.com RH-Author: Fam Zheng Message-id: <1417651524-18041-16-git-send-email-famz@redhat.com> Patchwork-id: 62688 O-Subject: [RHEL-7.1 qemu-kvm PATCH v5 15/30] block/vmdk: do not report file offset for compressed extents Bugzilla: 1134251 RH-Acked-by: Jeffrey Cody RH-Acked-by: Markus Armbruster RH-Acked-by: Max Reitz From: Peter Lieven Signed-off-by: Peter Lieven Reviewed-by: Fam Zheng Signed-off-by: Stefan Hajnoczi (cherry picked from commit 3eba13ec25341ce473591ff338eab3196890a4eb) Signed-off-by: Fam Zheng Signed-off-by: Jeff E. Nelson --- block/vmdk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/vmdk.c b/block/vmdk.c index c7b930f..e78a184 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1183,7 +1183,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; } -- 2.1.0