[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 11/46] block/vpc: write checksum back to footer afte
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 11/46] block/vpc: write checksum back to footer after check |
Date: |
Thu, 5 Apr 2012 17:51:49 +0200 |
From: Zhang Shengju <address@hidden>
After validation check, the 'checksum' is not written back
to footer, which leave it with zero.
This results in errors while loadding it under Microsoft's
Hyper-V environment, and also errors from utilities like
Citrix's vhd-util.
Signed-off-by: Zhang Shengju <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/vpc.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/block/vpc.c b/block/vpc.c
index 706faf3..5cd13d1 100644
--- a/block/vpc.c
+++ b/block/vpc.c
@@ -189,6 +189,9 @@ static int vpc_open(BlockDriverState *bs, int flags)
fprintf(stderr, "block-vpc: The header checksum of '%s' is "
"incorrect.\n", bs->filename);
+ /* Write 'checksum' back to footer, or else will leave it with zero. */
+ footer->checksum = be32_to_cpu(checksum);
+
// The visible size of a image in Virtual PC depends on the geometry
// rather than on the size stored in the footer (the size in the footer
// is too large usually)
--
1.7.6.5
- [Qemu-devel] [PATCH 38/46] qemu-iotests: Fix call syntax for qemu-io, (continued)
- [Qemu-devel] [PATCH 38/46] qemu-iotests: Fix call syntax for qemu-io, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 28/46] qemu-img: add image fragmentation statistics, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 21/46] vdi: change goto to loop, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 32/46] block: bdrv_append() fixes, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 13/46] qdev: add blocksize property type, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 20/46] vdi: do not create useless iovecs, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 42/46] blockdev: open images with BDRV_O_INCOMING on incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 25/46] block: fix streaming/closing race, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 36/46] qemu-iotests: Test unknown qcow2 header extensions, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 33/46] sheepdog: implement SD_OP_FLUSH_VDI operation, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 11/46] block/vpc: write checksum back to footer after check,
Kevin Wolf <=
- [Qemu-devel] [PATCH 15/46] vdi: basic conversion to coroutines, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 09/46] ide: Change serial number strncpy() to pstrcpy(), Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 27/46] block: document job API, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 19/46] vdi: leave bounce buffering to block layer, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 29/46] qed: image fragmentation statistics, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 14/46] block: enforce constraints on block size properties, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 12/46] qerror: fix QERR_PROPERTY_VALUE_OUT_OF_RANGE description, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 45/46] qed: honor BDRV_O_INCOMING for incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 44/46] migration: clear BDRV_O_INCOMING flags on end of incoming live migration, Kevin Wolf, 2012/04/05
- [Qemu-devel] [PATCH 34/46] sheepdog: fix send req helpers, Kevin Wolf, 2012/04/05