]> xenbits.xensource.com Git - qemu-xen-4.3-testing.git/commit
Fix L1 table endianess of qcow images created by tapdisk
authorIan Jackson <iwj@mariner.uk.xensource.com>
Fri, 28 Mar 2008 14:47:12 +0000 (14:47 +0000)
committerIan Jackson <Ian.Jackson@eu.citrix.com>
Mon, 12 May 2008 11:20:10 +0000 (12:20 +0100)
commitc090ccaec38ec15df3af8ecc867eea6ed4975dcd
treefe5b41872a2faa8dddcb11240d3f1036f3c622af
parent750200917eee4f465fd1519c97a7aafc0e1ecaa2
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.

Signed-off-by: Kevin Wolf <kwolf@suse.de>
 Patch cross-ported to qemu xen from hg commit
  c02deeae743221cbe9a1ac9769d21c292e267601

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
block-qcow.c