Bug 485471 - blktap qcow driver uses incompatible endianess vs qemu's qcow driver
Summary: blktap qcow driver uses incompatible endianess vs qemu's qcow driver
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: xen
Version: 5.4
Hardware: All
OS: Linux
low
medium
Target Milestone: rc
: ---
Assignee: Michal Novotny
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 486353
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-13 17:24 UTC by Daniel Berrangé
Modified: 2014-02-02 22:36 UTC (History)
3 users (show)

Fixed In Version: xen-3.0.3-86.el5
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-09-02 10:11:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Blktap qcow endianess compatibility fix (3.36 KB, patch)
2009-02-18 11:23 UTC, Michal Novotny
no flags Details | Diff
Patch after last BLKTAP update (3.52 KB, patch)
2009-02-20 16:01 UTC, Michal Novotny
no flags Details | Diff
Original version of this patch from upstream (3.59 KB, patch)
2009-04-29 14:19 UTC, Michal Novotny
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:1328 0 normal SHIPPED_LIVE xen bug fix and enhancement update 2009-09-01 10:32:30 UTC

Description Daniel Berrangé 2009-02-13 17:24:08 UTC
Description of problem:

The Xen blktap driver uses native endian L1 tables for qcow files. QEMU defines that the format is always big-endian. This means Xen qcow files are incompatible with QEMUs. This may hurt people migrating to KVM.

The following upstream changeset fixed Xen.

changeset:   17311:17e30b91b9e2
user:        Keir Fraser <keir.fraser>
date:        Thu Mar 27 17:13:37 2008 +0000
files:       tools/blktap/drivers/block-qcow.c
description:
tapdisk: Fix L1 table endianess of qcow images

Fix tapdisk to use big endian L1 tables as used by qemu/ioemu. Old
tapdisk images with native endianess are automagically converted to
big endian when the image file is opened for the first time.

Signed-off-by: Kevin Wolf <kwolf>


Version-Release number of selected component (if applicable):
xen-3.0.3-79.el5

How reproducible:
Not tried to reproduce, but should be doable by creating a qcow image under xen, and seeing if it then works in KVM

Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Michal Novotny 2009-02-18 11:23:32 UTC
Created attachment 332359 [details]
Blktap qcow endianess compatibility fix

This is patch correcting endianess compatibility problem in PV and FV guests. Both PV and FV now can use the same QCOW image. It's a backport of upstream at http://xenbits.xensource.com/xen-unstable.hg?rev/17e30b91b9e2 .

Comment 2 Michal Novotny 2009-02-20 16:01:50 UTC
Created attachment 332722 [details]
Patch after last BLKTAP update

Because of my last update concerning qcow image and poll-on-aio patch in BZ #486353 I had to create a new patch for this problem. Here it is. It solves endianess problem and it has been tested on RHEL 5.3 Xen and the same qcow image worked fine for both PV and FV guests...

Comment 3 Michal Novotny 2009-04-29 14:19:24 UTC
Created attachment 341757 [details]
Original version of this patch from upstream

This is upstream version that could be applied without modifications.

Comment 4 Jiri Denemark 2009-05-21 15:40:34 UTC
Fix built into xen-3.0.3-86.el5

Comment 6 Yewei Shao 2009-07-28 02:30:55 UTC
Verified on xen-3.0.3-91.el5

Comment 8 errata-xmlrpc 2009-09-02 10:11:34 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-1328.html


Note You need to log in before you can comment on or make changes to this bug.