Skip to contentSkip to conversation

parallels: add format spec

PATCH Superseded Denis V. Lunev 3 participants 6 messages Nov 16, 2015 – Nov 18, 2015

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parallels: add format spec

From: Vladimir Sementsov-Ogievskiy <[email protected]>

This specifies Parallels image format as implemented in Parallels Cloud Server 6.10

---
 MAINTAINERS              |   1 +
 docs/specs/parallels.txt | 218 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 219 insertions(+)
 create mode 100644 docs/specs/parallels.txt
MAINTAINERS +1 -0
index 9e1fa72..23441e1 100644
@@ -1471,6 +1471,7 @@ M: Denis V. Lunev <[email protected]>
 L: [email protected]
 S: Supported
 F: block/parallels.c
+F: docs/specs/parallels.txt
 
 qed
 M: Stefan Hajnoczi <[email protected]>
docs/specs/parallels.txt new file +218 -0

218 lines not on this page · raw message

Signature · 1 line
2.1.4
#1 lore raw
Quoted 4 lines · Denis V. Lunev

From: Vladimir Sementsov-Ogievskiy <[email protected]>

This specifies Parallels image format as implemented in Parallels Cloud Server 6.10

Are we the canonical location of the specification? If not, do we risk getting out of sync with the canonical Parallels Cloud Server documentation, in which case, wouldn't it be better to point to a URL of the externally-maintained spec rather than duplicating it here?

Review line 2

Quoted 4 lines

+++ b/docs/specs/parallels.txt

(quoted diff) +2 -0
@@ -0,0 +1,218 @@
+= Parallels Expandable Image File Format =
+

Is this document okay under the default GPLv2+ license, or does it need to explicitly call out a different license?

docs/specs/parallels.txt line 35

Quoted 11 lines
docs/specs/parallels.txt new file +11 -0
+== Header ==
+
+The header is placed at the start of an image and contains the following
+fields:
+
+    char      magic[16]
+              Must contain "WithoutFreeSpace" or "WithouFreSpacExt".
+
+    uint32    version
+              Must be 2.
+

You may want to compare to the qcow2 spec, which also lists expected byte offsets for each field (rather than having to count how many earlier fields of which widths were specified).

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#2 lore raw
Quoted 9 lines · Eric Blake
Quoted 4 lines · Denis V. Lunev

From: Vladimir Sementsov-Ogievskiy <[email protected]>

This specifies Parallels image format as implemented in Parallels Cloud Server 6.10

Are we the canonical location of the specification? If not, do we risk getting out of sync with the canonical Parallels Cloud Server documentation, in which case, wouldn't it be better to point to a URL of the externally-maintained spec rather than duplicating it here?

the problem is that this documentation is not published in the other place and for me keeping it here is a shorter way than getting the page on the official virtuozzo.com
Thus I would like to get this place a canonical location of it.

At the moment I can make a promise to keep it actual. There are no new features in the visible scope planned for PCS and they can not appear in Parallels Server without me.

There is another purpose though. This spec gives a base for Vladimir to implement named dirty bitmap support for Parallels images in QEMU as they are implemented in PCS. This is the main goal of this submission.

Quoted 6 lines

Review line 2

Quoted 4 lines

+++ b/docs/specs/parallels.txt

(quoted diff) +2 -0
@@ -0,0 +1,218 @@
+= Parallels Expandable Image File Format =
+

Is this document okay under the default GPLv2+ license, or does it need to explicitly call out a different license?

GPLv2 is OK for us. We can state this explicitly in the header if this is necessary.

Quoted 16 lines

docs/specs/parallels.txt line 35

Quoted 12 lines
docs/specs/parallels.txt new file +11 -0
+== Header ==
+
+The header is placed at the start of an image and contains the following
+fields:
+
+    char      magic[16]
+              Must contain "WithoutFreeSpace" or "WithouFreSpacExt".
+
+    uint32    version
+              Must be 2.
+

You may want to compare to the qcow2 spec, which also lists expected byte offsets for each field (rather than having to count how many earlier fields of which widths were specified).

this would be nice to implement unit tests. We will add this for sure! Thank you for an idea.

Den

#3 lore raw
In reply to Eric Blake
Quoted 18 lines · Eric Blake
Quoted 4 lines · Denis V. Lunev

From: Vladimir Sementsov-Ogievskiy <[email protected]>

This specifies Parallels image format as implemented in Parallels Cloud Server 6.10

Are we the canonical location of the specification? If not, do we risk getting out of sync with the canonical Parallels Cloud Server documentation, in which case, wouldn't it be better to point to a URL of the externally-maintained spec rather than duplicating it here?

Review line 2

Quoted 4 lines

+++ b/docs/specs/parallels.txt

(quoted diff) +2 -0
@@ -0,0 +1,218 @@
+= Parallels Expandable Image File Format =
+

Is this document okay under the default GPLv2+ license, or does it need to explicitly call out a different license?

Quoted 14 lines

docs/specs/parallels.txt line 35

Quoted 11 lines
docs/specs/parallels.txt new file +11 -0
+== Header ==
+
+The header is placed at the start of an image and contains the following
+fields:
+
+    char      magic[16]
+              Must contain "WithoutFreeSpace" or "WithouFreSpacExt".
+
+    uint32    version
+              Must be 2.
+

You may want to compare to the qcow2 spec, which also lists expected byte offsets for each field (rather than having to count how many earlier fields of which widths were specified).

I've compared qed spec with qcow2 spec and like the first one. What the need of specifying each offset? Creating a c-structure is simpler when you see types. and than offsetof and sizeof may be used if needed. Nobody will #define numeric offsets I think.

Signature · 3 lines
Best regards,
Vladimir
* now, @virtuozzo.com instead of @parallels.com. Sorry for this inconvenience.
#4 lore raw
Quoted 8 lines · Vladimir Sementsov-Ogievskiy
Quoted 3 lines

You may want to compare to the qcow2 spec, which also lists expected byte offsets for each field (rather than having to count how many earlier fields of which widths were specified).

I've compared qed spec with qcow2 spec and like the first one. What the need of specifying each offset? Creating a c-structure is simpler when you see types. and than offsetof and sizeof may be used if needed. Nobody will #define numeric offsets I think.

You'd be surprised (libvirt has some hard-coded numeric offsets:
https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/util/virstoragefile.c;h=2aa1d90;hb=5ed7afa9d#l159)

Also, listing offsets makes it obvious that you are NOT relying on compiler padding, and makes it obvious whether you have been careful that all 64-bit quantities are 8-byte-aligned without wasting space.

The original cow format (not qcow or qcow2) has the awful distinction of NOT having specified offsets, and had different layouts on 32-bit platforms than it did on 64-bit platforms; hence, we retired it in commit 550830f9 as unsupportable.

Signature · 2 lines
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org
#5 lore raw
Quoted 12 lines · Eric Blake
Quoted 7 lines · Vladimir Sementsov-Ogievskiy
Quoted 3 lines

You may want to compare to the qcow2 spec, which also lists expected byte offsets for each field (rather than having to count how many earlier fields of which widths were specified).

I've compared qed spec with qcow2 spec and like the first one. What the need of specifying each offset? Creating a c-structure is simpler when you see types. and than offsetof and sizeof may be used if needed. Nobody will #define numeric offsets I think.

You'd be surprised (libvirt has some hard-coded numeric offsets:
https://libvirt.org/git/?p=libvirt.git;a=blob;f=src/util/virstoragefile.c;h=2aa1d90;hb=5ed7afa9d#l159)

Quoted 9 lines

Also, listing offsets makes it obvious that you are NOT relying on compiler padding, and makes it obvious whether you have been careful that all 64-bit quantities are 8-byte-aligned without wasting space.

The original cow format (not qcow or qcow2) has the awful distinction of NOT having specified offsets, and had different layouts on 32-bit platforms than it did on 64-bit platforms; hence, we retired it in commit 550830f9 as unsupportable.

Thanks for explanation, I'll rework this. May be, it's definitely better to be absolutely accurate than get more comfort, when it is about specification..

Signature · 3 lines
Best regards,
Vladimir
* now, @virtuozzo.com instead of @parallels.com. Sorry for this inconvenience.