From patchwork Tue Dec 4 01:56:01 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Hubbard X-Patchwork-Id: 203533 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id AB74C2C00A7 for ; Tue, 4 Dec 2012 13:05:58 +1100 (EST) Received: from localhost ([::1]:55726 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfhtT-00038L-6t for incoming@patchwork.ozlabs.org; Mon, 03 Dec 2012 21:05:55 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60284) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfhtH-000384-QW for qemu-devel@nongnu.org; Mon, 03 Dec 2012 21:05:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TfhtC-0001Y6-7L for qemu-devel@nongnu.org; Mon, 03 Dec 2012 21:05:43 -0500 Received: from indium.canonical.com ([91.189.90.7]:49900) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TfhtB-0001Y1-Un for qemu-devel@nongnu.org; Mon, 03 Dec 2012 21:05:38 -0500 Received: from loganberry.canonical.com ([91.189.90.37]) by indium.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1TfhtB-0004iy-0R for ; Tue, 04 Dec 2012 02:05:37 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id ED81A2E807B for ; Tue, 4 Dec 2012 02:05:36 +0000 (UTC) MIME-Version: 1.0 Date: Tue, 04 Dec 2012 01:56:01 -0000 From: Robert Hubbard To: qemu-devel@nongnu.org X-Launchpad-Bug: product=qemu; status=New; importance=Undecided; assignee=None; X-Launchpad-Bug-Information-Type: Public X-Launchpad-Bug-Private: no X-Launchpad-Bug-Security-Vulnerability: no X-Launchpad-Bug-Commenters: hubbardmeister stefanha X-Launchpad-Bug-Reporter: Robert Hubbard (hubbardmeister) X-Launchpad-Bug-Modifier: Robert Hubbard (hubbardmeister) References: <20121105173251.17934.47567.malonedeb@soybean.canonical.com> <20121106223845.30587.74018.malone@gac.canonical.com> Message-Id: X-Launchpad-Message-Rationale: Subscriber (QEMU) @qemu-devel-ml Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="16335"; Instance="launchpad-lazr.conf" X-Launchpad-Hash: 68961565affeed25b10329dc71326dc7f8a42eb2 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 91.189.90.7 Subject: Re: [Qemu-devel] [Bug 1075252] Re: qemu-img cannot read VMDK4 file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Reply-To: Bug 1075252 <1075252@bugs.launchpad.net> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Hi Stefan, I have uploaded a patch - I am failing miserably to get any output from git patch!!!!!! ... :^( . the code is structured to addres the fact that convert will not work today, needs lots of work to do this. This would be next effort. i have a sub branch ... root@rhubbard qemu]# git status # On branch vmdk.c # Untracked files: # (use "git add ..." to include in what will be committed) # # myoutput # rhubbard-patch-fix-vmdk did a commit .. and here is git show..., don't know what to do next... i have used cvs et all.. don't know why this is not working 4 Me... commit 971ad8e198fa386214d8154904facbce2719fb06 Author: root Date: Mon Dec 3 17:11:28 2012 -0800 Bug#1075252 by Robert Hubbard: Fixed problems with StreammOptimized open, needs more work for convert. On Thu, Nov 8, 2012 at 12:15 AM, Stefan Hajnoczi <1075252@bugs.launchpad.net > wrote: > On Tue, Nov 6, 2012 at 11:38 PM, Robert Hubbard > wrote: > > Duplicate - Same issue related to header/footer - When does the code fix > > show up in the git release train ? > > > > bug 907063 . > > The bug reporter did not follow the steps for submitting a patch that I > posted: > > http://wiki.qemu.org/Contribute/SubmitAPatch > > Therefore the patch never reached the qemu-devel@nongnu.org mailing > list and was not merged. > > If you'd like to submit your patch please follow the steps on the wiki > page above. > > Thanks, > Stefan > > -- > You received this bug notification because you are subscribed to the bug > report. > https://bugs.launchpad.net/bugs/1075252 > > Title: > qemu-img cannot read VMDK4 file > > Status in QEMU: > New > > Bug description: > Unable to read any vmdk4 type files. Goal was to convert to a qcow2, > this worked after emitting code. > > OS is Centos linux 2.6.32. I pulled the latest git tree down for qemu > to see if this was resolved, it is not. > > Starting program: /home/rhubbard/QEMU/qemu/qemu-img info -f vmdk > /root/Juniper/beta1candidate-07122012-disk1.vmdk > > > There seems a mismatch with the l1_backup_tble_offset. this is now a > uint64 type. The value is actually "-512" because of this and this causes > the code check at line 418 in vmdk.c to erroneously think there is a > backup table. This causes vmdk open to fail. > and message > qemu failed to open .... > > > from debug; > gdb) x/4x &(s->l1_backup_table_offset) > 0xa61cd0: 0xfffffe00 0xffffffff 0x00a62770 0x00000000 > > (gdb) p *s > $1 = {hd = 0x0, l1_table_offset = 0, l1_backup_table_offset = -512, > l1_table = 0xa62770, > l1_backup_table = 0x0, l1_size = 64, l1_entry_sectors = 65536, l2_size > = 512, l2_cache = 0x0, > l2_cache_offsets = {0 }, l2_cache_counts = {0 > }, > cluster_sectors = 128, parent_cid = 4294967295} > > typedef struct BDRVVmdkState { > BlockDriverState *hd; > int64_t l1_table_offset; > <==== ??? - what should this be , don't know what the actual layout on the > vmdk spec says , is this a 64bit / 8 byte field ? > > int64_t l1_backup_table_offset; > uint32_t *l1_table; > uint32_t *l1_backup_table; > unsigned int l1_size; > uint32_t l1_entry_sectors; > > unsigned int l2_size; > > from vmdk.c > /*!!! if (s->l1_backup_table_offset) { > s->l1_backup_table = qemu_malloc(l1_size); > if (bdrv_pread(bs->file, s->l1_backup_table_offset, > s->l1_backup_table, l1_size) != l1_size) > goto fail; > > Breaks here.. > > Don't know the correct fix , thanks for help. > > To manage notifications about this bug go to: > https://bugs.launchpad.net/qemu/+bug/1075252/+subscriptions > diff --git a/block.h b/block.h index 78ecfac..1f55f6d 100644 --- a/block.h +++ b/block.h @@ -14,6 +14,8 @@ typedef struct BlockDriverInfo { int cluster_size; /* offset at which the VM state can be saved (0 if not possible) */ int64_t vm_state_offset; + int drv_type; + const char *drv_work; } BlockDriverInfo;