All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
To: Eric Blake <eblake@redhat.com>, "Denis V. Lunev" <den@openvz.org>
Cc: John Snow <jsnow@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 1/1] parallels: add format spec
Date: Wed, 18 Nov 2015 10:13:57 +0300	[thread overview]
Message-ID: <564C2535.6060106@virtuozzo.com> (raw)
In-Reply-To: <564C1D32.5070301@redhat.com>

On 18.11.2015 09:39, Eric Blake wrote:
> On 11/17/2015 11:15 PM, Vladimir Sementsov-Ogievskiy wrote:
>
>>> 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.
>

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..

-- 
Best regards,
Vladimir
* now, @virtuozzo.com instead of @parallels.com. Sorry for this inconvenience.

      reply	other threads:[~2015-11-18  7:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-16 11:52 [Qemu-devel] [PATCH 1/1] parallels: add format spec Denis V. Lunev
2015-11-17 15:54 ` Eric Blake
2015-11-17 16:46   ` Denis V. Lunev
2015-11-18  6:15   ` Vladimir Sementsov-Ogievskiy
2015-11-18  6:39     ` Eric Blake
2015-11-18  7:13       ` Vladimir Sementsov-Ogievskiy [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=564C2535.6060106@virtuozzo.com \
    --to=vsementsov@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=eblake@redhat.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.