qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v8 2/3] docs: define padding for qcow2 header


From: Eric Blake
Subject: Re: [PATCH v8 2/3] docs: define padding for qcow2 header
Date: Fri, 18 Oct 2019 09:02:06 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.1.0

On 10/18/19 4:47 AM, Vladimir Sementsov-Ogievskiy wrote:
Header extensions ends are already defined to be multiply of 8. Let's
gently ask for header length to be a multiply of 8 too, when we have
some additional fields. Requiring this may be considered as an
incompatible change, so the padding is optional. Actually, padding is
allowed before this patch (due to definition of additional fields),
the only actual change is "SHOULD" word.

Too weak. I've already argued that this should be mandatory, and that we are not breaking backwards compatibility, but merely clarifying what has already been implicit by the fact that header extensions are required to be 8-byte size multiple (which makes no sense unless they are also 8-byte aligned).


Signed-off-by: Vladimir Sementsov-Ogievskiy <address@hidden>
---
  docs/interop/qcow2.txt | 5 +++++
  1 file changed, 5 insertions(+)

diff --git a/docs/interop/qcow2.txt b/docs/interop/qcow2.txt
index 4709f3bb30..b971e59b1a 100644
--- a/docs/interop/qcow2.txt
+++ b/docs/interop/qcow2.txt
@@ -185,6 +185,11 @@ which is covered by @header_length must be zeroed.
< ... No additional fields in the header currently ... > +Header padding
+        If @header_length is larger than 104, software SHOULD make it a
+        multiply of 8, adding zero-padding after additional fields. Still the
+        padding is optional and may be absent in the image.
+
  Directly after the image header, optional sections called header extensions 
can
  be stored. Each extension has a structure like the following:

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]