Skip to contentSkip to conversation

qcow2: Explicit mention of padding bytes

PATCH In review Eric Blake 2 participants 3 messages May 22, 2023 – Jun 1, 2023

lore
Share & tools
lore

Eric Blake

author
#0 lore raw

PATCH 1/1 qcow2: Explicit mention of padding bytes

Although we already covered the need for padding bytes with our changes in commit 3ae3fcfa, commit 66fcbca5 (both v5.0.0) added one byte and relied on the rest of the text for implicitly covering 7 padding bytes. For consistency with other parts of the header (such as the header extension format listing padding from n - m, or the snapshot table entry listing variable padding), we might as well call out the remaining 7 bytes as padding until such time (as any) as they gain another meaning.

CC Vladimir Sementsov-Ogievskiy <[email protected]>

---

Spring cleaning my old branches.

v3: reviving an old patch; v2 was:
https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg00687.html

---
 docs/interop/qcow2.txt | 1 +
 1 file changed, 1 insertion(+)
docs/interop/qcow2.txt +1 -0
index e7f036c286b..2c4618375ad 100644
@@ -226,6 +226,7 @@ version 2.
                     <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 ===
 
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 11 lines · Eric Blake

Although we already covered the need for padding bytes with our changes in commit 3ae3fcfa, commit 66fcbca5 (both v5.0.0) added one byte and relied on the rest of the text for implicitly covering 7 padding bytes. For consistency with other parts of the header (such as the header extension format listing padding from n - m, or the snapshot table entry listing variable padding), we might as well call out the remaining 7 bytes as padding until such time (as any) as they gain another meaning.

CC Vladimir Sementsov-Ogievskiy <[email protected]>
Quoted 20 lines

---

Spring cleaning my old branches.

v3: reviving an old patch; v2 was:
https://lists.gnu.org/archive/html/qemu-devel/2020-04/msg00687.html

---
  docs/interop/qcow2.txt | 1 +
  1 file changed, 1 insertion(+)
docs/interop/qcow2.txt +1 -0
index e7f036c286b..2c4618375ad 100644
@@ -226,6 +226,7 @@ version 2.
                      <https://www.zlib.net/> in QEMU. However, clusters with the
                      deflate compression type do not have zlib headers.
 
+        105 - 111:  Padding, contents defined below.
 
Signature · 2 lines
Best regards,
Vladimir
author
#2 lore raw
Quoted 10 lines · Vladimir Sementsov-Ogievskiy
Quoted 9 lines · Eric Blake

Although we already covered the need for padding bytes with our changes in commit 3ae3fcfa, commit 66fcbca5 (both v5.0.0) added one byte and relied on the rest of the text for implicitly covering 7 padding bytes. For consistency with other parts of the header (such as the header extension format listing padding from n - m, or the snapshot table entry listing variable padding), we might as well call out the remaining 7 bytes as padding until such time (as any) as they gain another meaning.

Quoted 4 lines
Quoted 2 lines
CC Vladimir Sementsov-Ogievskiy <[email protected]>

Not strictly related to NBD, but I'll pick it up since I'm about to do a pull request.

Signature · 3 lines
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org