cryptospore / 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

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