|
|
9ae3a8 |
From dc64463e65223377bfb4a925f2f047b50090b32a Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Thu, 7 Nov 2013 16:07:08 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 23/25] vmdk: fix VMFS extent parsing
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1383795369-10623-3-git-send-email-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 55586
|
|
|
9ae3a8 |
O-Subject: [RHEL-7 qemu-kvm PATCH 2/2] vmdk: fix VMFS extent parsing
|
|
|
9ae3a8 |
Bugzilla: 995866
|
|
|
9ae3a8 |
RH-Acked-by: Amos Kong <akong@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
The VMFS extent line in description file doesn't have start offset as
|
|
|
9ae3a8 |
FLAT lines does, and it should be defaulted to 0. The flat_offset
|
|
|
9ae3a8 |
variable is initialized to -1, so we need to set it in this case.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit dbbcaa8d4358fdf3c42bf01e9e2d687300e84770)
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/vmdk.c | 2 ++
|
|
|
9ae3a8 |
1 files changed, 2 insertions(+), 0 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/vmdk.c b/block/vmdk.c
|
|
|
9ae3a8 |
index f2237cf..026b440 100644
|
|
|
9ae3a8 |
--- a/block/vmdk.c
|
|
|
9ae3a8 |
+++ b/block/vmdk.c
|
|
|
9ae3a8 |
@@ -737,6 +737,8 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
|
|
|
9ae3a8 |
error_setg(errp, "Invalid extent lines: \n%s", p);
|
|
|
9ae3a8 |
return -EINVAL;
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
+ } else if (!strcmp(type, "VMFS")) {
|
|
|
9ae3a8 |
+ flat_offset = 0;
|
|
|
9ae3a8 |
} else if (ret != 4) {
|
|
|
9ae3a8 |
error_setg(errp, "Invalid extent lines: \n%s", p);
|
|
|
9ae3a8 |
return -EINVAL;
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.7.1
|
|
|
9ae3a8 |
|