[libvirt] [PATCH v2] Detect VMDK version 3 files

Daniel P. Berrange posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20170509105846.20715-1-berrange@redhat.com
src/util/virstoragefile.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[libvirt] [PATCH v2] Detect VMDK version 3 files
Posted by Daniel P. Berrange 6 years, 11 months ago
The metadata libvirt cares about is identical for version 3
as for previous versions, so we merely need list the new
version number.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
---
 src/util/virstoragefile.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 94a77ce..b43acf6 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -113,7 +113,7 @@ enum {
     BACKING_STORE_ERROR,
 };
 
-#define FILE_TYPE_VERSIONS_LAST 2
+#define FILE_TYPE_VERSIONS_LAST 3
 
 struct FileEncryptionInfo {
     int format; /* Encryption format to assign */
@@ -374,7 +374,7 @@ static struct FileTypeInfo const fileTypeInfo[] = {
     },
     [VIR_STORAGE_FILE_VMDK] = {
         0, "KDMV", NULL,
-        LV_LITTLE_ENDIAN, 4, 4, {1, 2},
+        LV_LITTLE_ENDIAN, 4, 4, {1, 2, 3},
         4+4+4, 8, 512, NULL, vmdk4GetBackingStore, NULL
     },
 };
-- 
2.9.3

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] Detect VMDK version 3 files
Posted by John Ferlan 6 years, 11 months ago

On 05/09/2017 06:58 AM, Daniel P. Berrange wrote:
> The metadata libvirt cares about is identical for version 3
> as for previous versions, so we merely need list the new
> version number.
> 
> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
> ---
>  src/util/virstoragefile.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 

Reviewed-by: John Ferlan <jferlan@redhat.com>

Good thing there's cut-n-paste!

John

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list