From: Kevin Wolf <kwolf@suse.de>
To: Keir Fraser <keir.fraser@eu.citrix.com>
Cc: xen-devel@lists.xensource.com, Otavio Salvador <otavio@ossystems.com.br>
Subject: Re: The two image formats called qcow
Date: Wed, 26 Mar 2008 15:07:47 +0100 [thread overview]
Message-ID: <47EA58B3.2060808@suse.de> (raw)
In-Reply-To: <C41007FF.1E5EA%keir.fraser@eu.citrix.com>
Keir Fraser schrieb:
> On 26/3/08 13:54, "Kevin Wolf" <kwolf@suse.de> wrote:
>
>> ioemu: Fix L1 table endianess of qcow images created by tapdisk
>>
>> The qemu/ioemu implementation of the qcow format uses a big endian L1
>> table. tapdisk omits the necessary conversion, so qcow images have the
>> wrong endianess and cannot be read by correct implementations of qcow.
>>
>> This patch detects broken tapdisk images and converts their L1 tables to
>> big endian when the image file is opened in ioemu for the first time.
>> The fixed image has a new flag EXTHDR_L1_BIG_ENDIAN set in the extended
>> header.
>>
>> Note that a converted image cannot be opened by tapdisk again.
>
> Can we really tack an 'extended header' into a public format like qcow?
I didn't introduce this, it was already there in tapdisk. I don't see a
problem with it as the start of the L1 table is referenced in the normal
qcow header. qemu-img sets this to something like 0x48 which is
immediately after the header, tapdisk uses 0x1000 and gains some unused
space for things like the extended header. This is compatible with the
qcow implementation of qemu/ioemu.
On the other hand, I could simply strip that extended header (i.e.
overwrite the magic with 0x0) after having fixed the image. Then it
wouldn't be detected as broken on the next start as well.
Kevin
next prev parent reply other threads:[~2008-03-26 14:07 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-25 17:25 The two image formats called qcow Kevin Wolf
2008-03-25 18:58 ` Otavio Salvador
2008-03-26 8:10 ` Keir Fraser
2008-03-26 8:50 ` Kevin Wolf
2008-03-26 13:03 ` Otavio Salvador
2008-03-26 13:54 ` Kevin Wolf
2008-03-26 14:02 ` Keir Fraser
2008-03-26 14:07 ` Kevin Wolf [this message]
2008-03-26 14:15 ` Keir Fraser
2008-03-26 14:22 ` Kevin Wolf
2008-03-27 9:55 ` [PATCH] tapdisk: Fix L1 table endianess of qcow images Kevin Wolf
2008-03-26 13:23 ` The two image formats called qcow Daniel P. Berrange
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=47EA58B3.2060808@suse.de \
--to=kwolf@suse.de \
--cc=keir.fraser@eu.citrix.com \
--cc=otavio@ossystems.com.br \
--cc=xen-devel@lists.xensource.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.