yeahuh / rpms / qemu-kvm

Forked from rpms/qemu-kvm 2 years ago
Clone

Blame SOURCES/kvm-block-vmdk-do-not-report-file-offset-for-compressed-.patch

9ae3a8
From a03967321235d8ddf2cdf1db749a5a7109ab7451 Mon Sep 17 00:00:00 2001
9ae3a8
Message-Id: <a03967321235d8ddf2cdf1db749a5a7109ab7451.1418766606.git.jen@redhat.com>
9ae3a8
In-Reply-To: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com>
9ae3a8
References: <6f81b4847eb68ebdf54a8f1a771e19d112d74152.1418766606.git.jen@redhat.com>
9ae3a8
From: Fam Zheng <famz@redhat.com>
9ae3a8
Date: Thu, 4 Dec 2014 00:05:09 -0600
9ae3a8
Subject: [CHANGE 15/31] block/vmdk: do not report file offset for compressed
9ae3a8
 extents
9ae3a8
To: rhvirt-patches@redhat.com,
9ae3a8
    jen@redhat.com
9ae3a8
9ae3a8
RH-Author: Fam Zheng <famz@redhat.com>
9ae3a8
Message-id: <1417651524-18041-16-git-send-email-famz@redhat.com>
9ae3a8
Patchwork-id: 62688
9ae3a8
O-Subject: [RHEL-7.1 qemu-kvm PATCH v5 15/30] block/vmdk: do not report file offset for compressed extents
9ae3a8
Bugzilla: 1134251
9ae3a8
RH-Acked-by: Jeffrey Cody <jcody@redhat.com>
9ae3a8
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
9ae3a8
RH-Acked-by: Max Reitz <mreitz@redhat.com>
9ae3a8
9ae3a8
From: Peter Lieven <pl@kamp.de>
9ae3a8
9ae3a8
Signed-off-by: Peter Lieven <pl@kamp.de>
9ae3a8
Reviewed-by: Fam Zheng <famz@redhat.com>
9ae3a8
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
9ae3a8
(cherry picked from commit 3eba13ec25341ce473591ff338eab3196890a4eb)
9ae3a8
Signed-off-by: Fam Zheng <famz@redhat.com>
9ae3a8
Signed-off-by: Jeff E. Nelson <jen@redhat.com>
9ae3a8
---
9ae3a8
 block/vmdk.c | 2 +-
9ae3a8
 1 file changed, 1 insertion(+), 1 deletion(-)
9ae3a8
9ae3a8
diff --git a/block/vmdk.c b/block/vmdk.c
9ae3a8
index c7b930f..e78a184 100644
9ae3a8
--- a/block/vmdk.c
9ae3a8
+++ b/block/vmdk.c
9ae3a8
@@ -1183,7 +1183,7 @@ static int64_t coroutine_fn vmdk_co_get_block_status(BlockDriverState *bs,
9ae3a8
         break;
9ae3a8
     case VMDK_OK:
9ae3a8
         ret = BDRV_BLOCK_DATA;
9ae3a8
-        if (extent->file == bs->file) {
9ae3a8
+        if (extent->file == bs->file && !extent->compressed) {
9ae3a8
             ret |= BDRV_BLOCK_OFFSET_VALID | offset;
9ae3a8
         }
9ae3a8
 
9ae3a8
-- 
9ae3a8
2.1.0
9ae3a8