block: VHDX endian fixes
commit4f75b52a07e0a0e71c1c81d0cb0ddf9c52c8e1bc
authorJeff Cody <jcody@redhat.com>
Wed, 6 Aug 2014 19:54:58 +0000 (6 15:54 -0400)
committerKevin Wolf <kwolf@redhat.com>
Fri, 15 Aug 2014 13:07:14 +0000 (15 15:07 +0200)
tree4725d765df96358203dcaed03f633e465685294a
parent349592e0b9112171500e940dd921bb96cfc496d2
block: VHDX endian fixes

This patch contains several changes for endian conversion fixes for
VHDX, particularly for big-endian machines (multibyte values in VHDX are
all on disk in LE format).

Tests were done with existing qemu-iotests on an IBM POWER7 (8406-71Y).
This includes sample images created by Hyper-V, both with dirty logs and
without.

In addition, VHDX image files created (and written to) on a BE machine
were tested on a LE machine, and vice-versa.

Reported-by: Markus Armburster <armbru@redhat.com>
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/vhdx-endian.c
block/vhdx-log.c
block/vhdx.c
block/vhdx.h