[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 12/16] block: Fix vpc initialization of the Dynamic
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 12/16] block: Fix vpc initialization of the Dynamic Disk Header |
Date: |
Fri, 11 Nov 2011 18:39:24 +0100 |
From: Charles Arnold <address@hidden>
The Data Offset field in the Dynamic Disk Header is an 8 byte field.
Although the specification (2006-10-11) gives an example of initializing
only the first 4 bytes, images generated by Microsoft on Windows initialize
all 8 bytes.
Failure to initialize all 8 bytes results in errors from utilities
like Citrix's vhd-util which checks specifically for the proper Data
Offset field initialization.
Signed-off-by: Charles Arnold <address@hidden>
Reviewed-by: Andreas Färber <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vpc.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index 79be7d0..54633b6 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -617,7 +617,11 @@ static int vpc_create(const char *filename,
QEMUOptionParameter *options)
memcpy(dyndisk_header->magic, "cxsparse", 8);
- dyndisk_header->data_offset = be64_to_cpu(0xFFFFFFFF);
+ /*
+ * Note: The spec is actually wrong here for data_offset, it says
+ * 0xFFFFFFFF, but MS tools expect all 64 bits to be set.
+ */
+ dyndisk_header->data_offset = be64_to_cpu(0xFFFFFFFFFFFFFFFFULL);
dyndisk_header->table_offset = be64_to_cpu(3 * 512);
dyndisk_header->version = be32_to_cpu(0x00010000);
dyndisk_header->block_size = be32_to_cpu(block_size);
--
1.7.6.4
- [Qemu-devel] [PATCH 04/16] scsi-disk: implement eject requests, (continued)
- [Qemu-devel] [PATCH 04/16] scsi-disk: implement eject requests, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 05/16] nbd: treat EPIPE from NBD_DO_IT as success, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 07/16] qemu-nbd: rename socket variable, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 09/16] qemu-nbd: print error messages from the daemon through a pipe, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 08/16] qemu-nbd: move client to a thread, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 11/16] qemu-nbd: open the block device after starting the client thread, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 15/16] block: Introduce bdrv_co_flush_to_os, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 14/16] block: Rename bdrv_co_flush to bdrv_co_flush_to_disk, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 16/16] block: Make cache=unsafe flush to the OS, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 10/16] qemu-nbd: fix socket creation race, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 12/16] block: Fix vpc initialization of the Dynamic Disk Header,
Kevin Wolf <=
- [Qemu-devel] [PATCH 06/16] qemu-nbd: trap SIGTERM, Kevin Wolf, 2011/11/11
- [Qemu-devel] [PATCH 13/16] hw/pc.c: Fix use-while-uninitialized of fd_type[], Kevin Wolf, 2011/11/11
- Re: [Qemu-devel] [PULL 00/16] Block patches for 1.0, Anthony Liguori, 2011/11/13