docs/interop: convert text files to restructuredText
PATCH v2 1/1 docs/interop: convert text files to restructuredText
From: Souleymane Conte <[email protected]>
---
docs/interop/index.rst | 1 +
docs/interop/{qcow2.txt => qcow2.rst} | 210 +++++++++++++++-----------
2 files changed, 123 insertions(+), 88 deletions(-)
rename docs/interop/{qcow2.txt => qcow2.rst} (89%)docs/interop/index.rst +1 -0
@@ -23,6 +23,7 @@ are useful for making QEMU interoperate with other software. qemu-ga-ref qemu-qmp-ref qemu-storage-daemon-qmp-ref + qcow2 vhost-user vhost-user-gpu vhost-vdpa
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +122 -88
512 lines not on this page · raw message
Signature · 1 line
2.49.0
PATCH v2 1/1 docs/interop: convert text files to restructuredText
From: Souleymane Conte <[email protected]>
---
docs/interop/index.rst | 1 +
docs/interop/{qcow2.txt => qcow2.rst} | 218 +++++++++++++++-----------
2 files changed, 128 insertions(+), 91 deletions(-)
rename docs/interop/{qcow2.txt => qcow2.rst} (88%)docs/interop/index.rst +1 -0
@@ -23,6 +23,7 @@ are useful for making QEMU interoperate with other software. qemu-ga-ref qemu-qmp-ref qemu-storage-daemon-qmp-ref + qcow2 vhost-user vhost-user-gpu vhost-vdpa
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +127 -91
534 lines not on this page · raw message
Signature · 1 line
2.49.0
Quoted 6 lines · On Fri, 16 May 2025 at 16:01, <[email protected]> wrote:
From: Souleymane Conte <[email protected]>
Signed-off-by Souleymane Conte <[email protected]>
Thanks for this patch. It looks good, so I only have some minor changes to suggest below.
A minor thing: for a single patch, please don't send a cover letter -- it confuses some of our automated tooling. Cover letters are only needed for multi-patch series.
For a single patch, if you want to add notes about e.g. changes between v1 and v2, you can put them below the '---' line...
Quoted 1 line
---
...here. Text here won't go into the final git commit message.
Quoted 10 lines
docs/interop/index.rst | 1 + docs/interop/{qcow2.txt => qcow2.rst} | 218 +++++++++++++++----------- 2 files changed, 128 insertions(+), 91 deletions(-) rename docs/interop/{qcow2.txt => qcow2.rst} (88%)docs/interop/index.rst +0
-0
docs/interop/index.rst are useful for making QEMU interoperate with other software. · line 26
Quoted 4 lines
docs/interop/index.rst +1
-0@@ -23,6 +23,7 @@ are useful for making QEMU interoperate with other software. qemu-ga-ref qemu-qmp-ref qemu-storage-daemon-qmp-ref + qcow2
I think I would put this a little further up in the index, just below "parallels". That way it goes together with the other image-format specs in the index list.
Quoted 36 lines
docs/interop/index.rst +0
-0vhost-user vhost-user-gpu vhost-vdpadocs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +7
-5@@ -1,6 +1,8 @@ -== General == +================ +Qcow2 Image File +================ -A qcow2 image file is organized in units of constant size, which are called +A *qcow2* image file is organized in units of constant size, which are called (host) clusters. A cluster is the unit in which all allocations are done, both for actual guest data and for image metadata.@@ -9,10 +11,10 @@ clusters of the same size. All numbers in qcow2 are stored in Big Endian byte order. +Header +------ -== Header == - -The first cluster of a qcow2 image contains the file header: +The first cluster of a qcow2 image contains the file header:: Byte 0 - 3: magic QCOW magic string ("QFI\xfb")
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file header: · line 43
Quoted 5 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1@@ -38,7 +40,7 @@ The first cluster of a qcow2 image contains the file header: within a cluster (1 << cluster_bits is the cluster size). Must not be less than 9 (i.e. 512 byte clusters). - Note: qemu as of today has an implementation limit of 2 MB + Note: Qemu as of today has an implementation limit of 2 MB
If we're going to change this kind of thing: the correct spelling is all-caps "QEMU".
Quoted 45 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +9
-6as the maximum cluster size and won't be able to open images with larger cluster sizes.@@ -48,7 +50,7 @@ The first cluster of a qcow2 image contains the file header: 24 - 31: size Virtual disk size in bytes. - Note: qemu has an implementation limit of 32 MB as + Note: Qemu has an implementation limit of 32 MB as the maximum L1 table size. With a 2 MB cluster size, it is unable to populate a virtual cluster beyond 2 EB (61 bits); with a 512 byte cluster@@ -88,6 +90,7 @@ The first cluster of a qcow2 image contains the file header: For version 2, the header is exactly 72 bytes in length, and finishes here. For version 3 or higher, the header length is at least 104 bytes, including the next fields through header_length. +:: 72 - 79: incompatible_features Bitmask of incompatible features. An implementation must@@ -185,7 +188,8 @@ the next fields through header_length. of 8. -=== Additional fields (version 3 and higher) === +Additional fields (version 3 and higher) +---------------------------------------- In general, these fields are optional and may be safely ignored by the software, as well as filled by zeros (which is equal to field absence), if software needs@@ -193,21 +197,25 @@ to set field B, but does not care about field A which precedes B. More formally, additional fields have the following compatibility rules: 1. If the value of the additional field must not be ignored for correct -handling of the file, it will be accompanied by a corresponding incompatible -feature bit. + handling of the file, it will be accompanied by a corresponding incompatible + feature bit. 2. If there are no unrecognized incompatible feature bits set, an unknown -additional field may be safely ignored other than preserving its value when -rewriting the image header. + additional field may be safely ignored other than preserving its value when + rewriting the image header. +
docs/interop/qcow2.rst to set field B, but does not care about field A which precedes B. More · line 214
Quoted 10 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-2+.. _ref_rules_3: 3. An explicit value of 0 will have the same behavior as when the field is not -present*, if not altered by a specific incompatible bit. + present*, if not altered by a specific incompatible bit. -*. A field is considered not present when header_length is less than or equal +(*) A field is considered not present when *header_length* is less than or equal to the field's offset. Also, all additional fields are not present for version 2.
For references in formatted text to things like field names, function names, filenames and similar fixed-strings, I recommend ``header_length`` (which gives monospaced) rather than *header_length* (which is italics) or **header_length** (which is bold).
Quoted 8 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-1- 104: compression_type +:: + + 104: compression_type Defines the compression method used for compressed clusters. All compressed clusters in an image use the same compression
docs/interop/qcow2.rst version 2. · line 231
Quoted 7 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +2
-2@@ -219,28 +227,30 @@ version 2. or must be zero (which means deflate). Available compression type values: - 0: deflate <https://www.ietf.org/rfc/rfc1951.txt> - 1: zstd <http://github.com/facebook/zstd> + - 0: deflate https://www.ietf.org/rfc/rfc1951.txt + - 1: zstd <http://github.com/facebook/zstd>
We should be consistent about whether we have the angle brackets or not.
This is all in a fixed-width text block, so the URL isn't going to be formatted anyway. Might as well leave the angleb rackets in, for consistency with e.g. below.
docs/interop/qcow2.rst version 2. · line 233
Quoted 3 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1- The deflate compression type is called "zlib" + The deflate compression type is called zlib
Any reason to drop the quotes here ?
Quoted 31 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +7
-5<https://www.zlib.net/> in QEMU. However, clusters with the deflate compression type do not have zlib headers. 105 - 111: Padding, contents defined below. -=== Header padding === +Header padding +-------------- -@header_length must be a multiple of 8, which means that if the end of the last +*header_length* must be a multiple of 8, which means that if the end of the last additional field is not aligned, some padding is needed. This padding must be zeroed, so that if some existing (or future) additional field will fall into -the padding, it will be interpreted accordingly to point [3.] of the previous +the padding, it will be interpreted accordingly to point `[3.] <#ref_rules_3>`_ of the previous paragraph, i.e. in the same manner as when this field is not present. -=== Header extensions === +Header extensions +----------------- Directly after the image header, optional sections called header extensions can -be stored. Each extension has a structure like the following: +be stored. Each extension has a structure like the following:: Byte 0 - 3: Header extension type: 0x00000000 - End of the header extension area@@ -270,17 +280,19 @@ data of compatible features that it doesn't support. Compatible features that need space for additional data can use a header extension.
docs/interop/qcow2.rst data of compatible features that it doesn't support. Compatible features that · line 289
Quoted 10 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-2-== String header extensions == +String header extensions +------------------------ Some header extensions (such as the backing file format name and the external data file name) are just a single string. In this case, the header extension length is the string length and the string is not '\0' terminated. (The header -extension padding can make it look like a string is '\0' terminated, but +extension padding can make it looks like a string is '\0' terminated, but
The original text is correct: this should be "make it look like".
Sphinx will interpret the '\' in '\0' as an escape, so it renders this as "'0' terminated". If you write this with the ``...`` for fixed-width text:
make it look like a string is ``\0`` terminated
then Sphinx will output the backslash as a literal in the output.
Quoted 34 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +10
-13@@ -377,35 +392,42 @@ Logically the layout looks like +-----------------------------+ | QCow2 header | + +-----------------------------+ | QCow2 header extension X | + +-----------------------------+ | QCow2 header extension FDE | + +-----------------------------+ | QCow2 header extension ... | + +-----------------------------+ | QCow2 header extension Z | +-----------------------------+ + | ... | + +-----------------------------+ + | ... | + +-----------------------------+ | ....other QCow2 tables.... | - . . - . . +-----------------------------+ - | +-------------------------+ | - | | LUKS partition header | | - | +-------------------------+ | - | | LUKS key material 1 | | - | +-------------------------+ | - | | LUKS key material 2 | | - | +-------------------------+ | - | | LUKS key material ... | | - | +-------------------------+ | - | | LUKS key material 8 | | - | +-------------------------+ | + | +------------------------+ | + | | LUKS partition header | |
docs/interop/qcow2.rst Logically the layout looks like · line 421
Quoted 10 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +10
-0+ | +------------------------+ | + | | LUKS key material 1 | | + | +------------------------+ | + | | LUKS key material 2 | | + | +------------------------+ | + | | LUKS key material ... | | + | +------------------------+ | + | | LUKS key material 8 | | + | +------------------------+ | + +-----------------------------+
This does not seem to render as a nested table.
Probably the simplest thing is to use the "::" syntax to keep this as ASCII art, similar to the way you've handled the other fixed-width tables in this document.
Quoted 5 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-1+ | QCow2 cluster payload | + +-----------------------------+ + | | +-----------------------------+ - | QCow2 cluster payload |
docs/interop/qcow2.rst Logically the layout looks like
Quoted 10 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-4- . . - . . - . . | | +-----------------------------+ -Refcount block entry (x = refcount_bits - 1): +Refcount block entry (x = refcount_bits - 1)::
You could put ``(x = refcount_bits - 1)`` to make the code fragment render in monospace.
docs/interop/qcow2.rst Standard Cluster Descriptor: · line 605
Quoted 2 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1-Compressed Clusters Descriptor (x = 62 - (cluster_bits - 8)): +Compressed Clusters Descriptor (x = 62 - (cluster_bits - 8))::
and similarly here.
thanks
-- PMM
Hi,
Thank you for the review and the advices also.
I will make some corrections based on the review for v3. Here are the main changes:
- Nested table rending in code blocks
- monospace usage for all filenames, fields name and function references
- rendering of "\0" character using ``
Thanks,
Souleymane Conte
Le lun. 19 mai 2025 à 15:37, Peter Maydell <[email protected]> a écrit :
Quoted 350 lines · On Fri, 16 May 2025 at 16:01, <[email protected]> wrote:
Quoted 6 lines
From: Souleymane Conte <[email protected]>
Signed-off-by Souleymane Conte <[email protected]>Thanks for this patch. It looks good, so I only have some minor changes to suggest below.
A minor thing: for a single patch, please don't send a cover letter -- it confuses some of our automated tooling. Cover letters are only needed for multi-patch series.
For a single patch, if you want to add notes about e.g. changes between v1 and v2, you can put them below the '---' line...
Quoted 1 line
---
...here. Text here won't go into the final git commit message.
docs/interop/index.rst are useful for making QEMU interoperate with other
Quoted 10 lines
docs/interop/index.rst | 1 + docs/interop/{qcow2.txt => qcow2.rst} | 218 +++++++++++++++----------- 2 files changed, 128 insertions(+), 91 deletions(-) rename docs/interop/{qcow2.txt => qcow2.rst} (88%)docs/interop/index.rst +0
-0@@ -23,6 +23,7 @@ are useful for making QEMU interoperate with othersoftware.
docs/interop/index.rst are useful for making QEMU interoperate with other software. · line 26
Quoted 4 lines
docs/interop/index.rst +1
-0qemu-ga-ref qemu-qmp-ref qemu-storage-daemon-qmp-ref + qcow2I think I would put this a little further up in the index, just below "parallels". That way it goes together with the other image-format specs in the index list.
Quoted 11 lines
docs/interop/index.rst +0
-0vhost-user vhost-user-gpu vhost-vdpadocs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0docs/interop/qcow2.rst line 3
Quoted 6 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-2@@ -1,6 +1,8 @@ -== General == +================ +Qcow2 Image File +================ -A qcow2 image file is organized in units of constant size, which arecalled
docs/interop/qcow2.rst line 5
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0+A *qcow2* image file is organized in units of constant size, which arecalled
docs/interop/qcow2.rst line 6
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0(host) clusters. A cluster is the unit in which all allocations aredone,
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file
Quoted 17 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-3both for actual guest data and for image metadata.@@ -9,10 +11,10 @@ clusters of the same size. All numbers in qcow2 are stored in Big Endian byte order. +Header +------ -== Header == - -The first cluster of a qcow2 image contains the file header: +The first cluster of a qcow2 image contains the file header:: Byte 0 - 3: magic QCOW magic string ("QFI\xfb")@@ -38,7 +40,7 @@ The first cluster of a qcow2 image contains the fileheader:
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file · line 40
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0within a cluster (1 << cluster_bits is the clustersize).
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file header:
Quoted 3 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-1Must not be less than 9 (i.e. 512 byte clusters). - Note: qemu as of today has an implementation limitof 2 MB
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file · line 43
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0+ Note: Qemu as of today has an implementation limitof 2 MB
If we're going to change this kind of thing: the correct spelling is all-caps "QEMU".
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file · line 44
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0as the maximum cluster size and won't be able toopen images
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file
Quoted 3 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0with larger cluster sizes.@@ -48,7 +50,7 @@ The first cluster of a qcow2 image contains the fileheader:
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file
Quoted 9 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-124 - 31: size Virtual disk size in bytes. - Note: qemu has an implementation limit of 32 MB as + Note: Qemu has an implementation limit of 32 MB as the maximum L1 table size. With a 2 MB cluster size, it is unable to populate a virtual cluster beyond 2 EB (61 bits); with a 512 byte cluster@@ -88,6 +90,7 @@ The first cluster of a qcow2 image contains the fileheader:
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file · line 90
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0For version 2, the header is exactly 72 bytes in length, and finisheshere.
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file · line 91
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0For version 3 or higher, the header length is at least 104 bytes,including
docs/interop/qcow2.rst The first cluster of a qcow2 image contains the file header:
Quoted 5 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0the next fields through header_length. +:: 72 - 79: incompatible_features Bitmask of incompatible features. An implementationmust
docs/interop/qcow2.rst the next fields through header_length. · line 194
Quoted 9 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +2
-1@@ -185,7 +188,8 @@ the next fields through header_length. of 8. -=== Additional fields (version 3 and higher) === +Additional fields (version 3 and higher) +---------------------------------------- In general, these fields are optional and may be safely ignored by thesoftware,
docs/interop/qcow2.rst the next fields through header_length. · line 195
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0as well as filled by zeros (which is equal to field absence), ifsoftware needs
docs/interop/qcow2.rst to set field B, but does not care about field A
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0@@ -193,21 +197,25 @@ to set field B, but does not care about field Awhich precedes B. More
docs/interop/qcow2.rst to set field B, but does not care about field A which precedes B. More
Quoted 4 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-1formally, additional fields have the following compatibility rules: 1. If the value of the additional field must not be ignored for correct -handling of the file, it will be accompanied by a correspondingincompatible
docs/interop/qcow2.rst to set field B, but does not care about field A · line 200
Quoted 2 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1-feature bit. + handling of the file, it will be accompanied by a correspondingincompatible
docs/interop/qcow2.rst to set field B, but does not care about field A which precedes B. More
Quoted 3 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0+ feature bit. 2. If there are no unrecognized incompatible feature bits set, anunknown
docs/interop/qcow2.rst to set field B, but does not care about field A · line 200
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-1-additional field may be safely ignored other than preserving its valuewhen
docs/interop/qcow2.rst to set field B, but does not care about field A · line 204
Quoted 2 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1-rewriting the image header. + additional field may be safely ignored other than preserving itsvalue when
docs/interop/qcow2.rst to set field B, but does not care about field A which precedes B. More
Quoted 5 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-0+ rewriting the image header. + +.. _ref_rules_3: 3. An explicit value of 0 will have the same behavior as when the fieldis not
docs/interop/qcow2.rst to set field B, but does not care about field A which precedes B. More
Quoted 4 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-2-present*, if not altered by a specific incompatible bit. + present*, if not altered by a specific incompatible bit. -*. A field is considered not present when header_length is less than orequal
docs/interop/qcow2.rst to set field B, but does not care about field A · line 212
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0+(*) A field is considered not present when *header_length* is less thanor equal
docs/interop/qcow2.rst to set field B, but does not care about field A which precedes B. More · line 214
Quoted 2 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0to the field's offset. Also, all additional fields are not present for version 2.For references in formatted text to things like field names, function names, filenames and similar fixed-strings, I recommend ``header_length`` (which gives monospaced) rather than *header_length* (which is italics) or **header_length** (which is bold).
docs/interop/qcow2.rst to set field B, but does not care about field A which precedes B. More
Quoted 6 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-1- 104: compression_type +:: + + 104: compression_type Defines the compression method used for compressedclusters.
docs/interop/qcow2.rst to set field B, but does not care about field A · line 220
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0All compressed clusters in an image use the samecompression
docs/interop/qcow2.rst version 2. · line 222
Quoted 5 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-1@@ -219,28 +227,30 @@ version 2. or must be zero (which means deflate). Available compression type values: - 0: deflate <docs/interop/qcow2.rst version 2. · line 230
Quoted 2 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1- 1: zstd <http://github.com/facebook/zstd> + - 0: deflatedocs/interop/qcow2.rst version 2. · line 231
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0+ - 1: zstd <http://github.com/facebook/zstd>We should be consistent about whether we have the angle brackets or not.
This is all in a fixed-width text block, so the URL isn't going to be formatted anyway. Might as well leave the angleb rackets in, for consistency with e.g. below.
docs/interop/qcow2.rst version 2. · line 233
Quoted 3 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1- The deflate compression type is called "zlib" + The deflate compression type is called zlibAny reason to drop the quotes here ?
docs/interop/qcow2.rst version 2. · line 233
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0<https://www.zlib.net/> in QEMU. However, clusterswith the
docs/interop/qcow2.rst version 2.
Quoted 9 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +2
-2deflate compression type do not have zlib headers. 105 - 111: Padding, contents defined below. -=== Header padding === +Header padding +-------------- -@header_length must be a multiple of 8, which means that if the end ofthe last
docs/interop/qcow2.rst version 2. · line 241
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0+*header_length* must be a multiple of 8, which means that if the end ofthe last
docs/interop/qcow2.rst version 2. · line 242
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0additional field is not aligned, some padding is needed. This paddingmust be
docs/interop/qcow2.rst version 2. · line 243
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0zeroed, so that if some existing (or future) additional field will fallinto
docs/interop/qcow2.rst version 2. · line 235
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-1-the padding, it will be interpreted accordingly to point [3.] of theprevious
docs/interop/qcow2.rst version 2. · line 244
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-0+the padding, it will be interpreted accordingly to point `[3.]<#ref_rules_3>`_ of the previous
docs/interop/qcow2.rst version 2.
Quoted 8 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +2
-1paragraph, i.e. in the same manner as when this field is not present. -=== Header extensions === +Header extensions +----------------- Directly after the image header, optional sections called headerextensions can
docs/interop/qcow2.rst data of compatible features that it doesn't
Quoted 6 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1-be stored. Each extension has a structure like the following: +be stored. Each extension has a structure like the following:: Byte 0 - 3: Header extension type: 0x00000000 - End of the header extension area@@ -270,17 +280,19 @@ data of compatible features that it doesn'tsupport. Compatible features that
docs/interop/qcow2.rst data of compatible features that it doesn't support. Compatible features that
Quoted 8 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +2
-1need space for additional data can use a header extension. -== String header extensions == +String header extensions +------------------------ Some header extensions (such as the backing file format name and theexternal
docs/interop/qcow2.rst data of compatible features that it doesn't · line 287
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0data file name) are just a single string. In this case, the headerextension
docs/interop/qcow2.rst data of compatible features that it doesn't · line 288
Quoted 1 line
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +0
-0length is the string length and the string is not '\0' terminated. (Theheader
docs/interop/qcow2.rst data of compatible features that it doesn't · line 289
Quoted 2 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1-extension padding can make it look like a string is '\0' terminated, but +extension padding can make it looks like a string is '\0' terminated,but
The original text is correct: this should be "make it look like".
Sphinx will interpret the '\' in '\0' as an escape, so it renders this as "'0' terminated". If you write this with the ``...`` for fixed-width text:
make it look like a string is ``\0`` terminated
then Sphinx will output the backslash as a literal in the output.Quoted 34 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +10
-13@@ -377,35 +392,42 @@ Logically the layout looks like +-----------------------------+ | QCow2 header | + +-----------------------------+ | QCow2 header extension X | + +-----------------------------+ | QCow2 header extension FDE | + +-----------------------------+ | QCow2 header extension ... | + +-----------------------------+ | QCow2 header extension Z | +-----------------------------+ + | ... | + +-----------------------------+ + | ... | + +-----------------------------+ | ....other QCow2 tables.... | - . . - . . +-----------------------------+ - | +-------------------------+ | - | | LUKS partition header | | - | +-------------------------+ | - | | LUKS key material 1 | | - | +-------------------------+ | - | | LUKS key material 2 | | - | +-------------------------+ | - | | LUKS key material ... | | - | +-------------------------+ | - | | LUKS key material 8 | | - | +-------------------------+ | + | +------------------------+ | + | | LUKS partition header | |docs/interop/qcow2.rst Logically the layout looks like · line 421
Quoted 10 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +10
-0+ | +------------------------+ | + | | LUKS key material 1 | | + | +------------------------+ | + | | LUKS key material 2 | | + | +------------------------+ | + | | LUKS key material ... | | + | +------------------------+ | + | | LUKS key material 8 | | + | +------------------------+ | + +-----------------------------+This does not seem to render as a nested table.
Probably the simplest thing is to use the "::" syntax to keep this as ASCII art, similar to the way you've handled the other fixed-width tables in this document.
Quoted 5 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +3
-1+ | QCow2 cluster payload | + +-----------------------------+ + | | +-----------------------------+ - | QCow2 cluster payload |docs/interop/qcow2.rst Logically the layout looks like
Quoted 10 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-4- . . - . . - . . | | +-----------------------------+ -Refcount block entry (x = refcount_bits - 1): +Refcount block entry (x = refcount_bits - 1)::You could put ``(x =
refcount_bits- 1)`` to make the code fragment render in monospace.docs/interop/qcow2.rst Standard Cluster Descriptor: · line 605
Quoted 2 lines
docs/interop/qcow2.rst renamed from docs/interop/qcow2.txt +1
-1-Compressed Clusters Descriptor (x = 62 - (cluster_bits - 8)): +Compressed Clusters Descriptor (x = 62 - (cluster_bits - 8))::and similarly here.
thanks
-- PMM
v2 cover docs/interop: convert text files to reStructuredText
In reply to [email protected]From: Souleymane Conte <[email protected]>
This patch converts the qcow2.txt documentation into reStructuredText format (qcow2.rst)
Changes since v1:
- Fixed typo: "Each entry look" -> "Each entry looks"
- Adjusted nested layout diagrams for better .rst rendering
- Capitalized "QEMU" consistently throughout the doc
Souleymane Conte (1):
docs/interop: convert text files to restructuredText
docs/interop/index.rst | 1 +
docs/interop/{qcow2.txt => qcow2.rst} | 218 +++++++++++++++-----------
2 files changed, 128 insertions(+), 91 deletions(-)
rename docs/interop/{qcow2.txt => qcow2.rst} (88%)Signature · 1 line
2.49.0