qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Christoph Hellwig <hch@lst.de>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vmdk: Fix backing file handling
Date: Fri, 17 Jul 2009 12:53:01 +0200	[thread overview]
Message-ID: <4A60580D.40905@redhat.com> (raw)
In-Reply-To: <20090717103438.GA6729@lst.de>

Christoph Hellwig schrieb:
> On Fri, Jul 17, 2009 at 08:20:41AM +0200, Kevin Wolf wrote:
>> Instead of storing the backing file in its own BlockDriverState, VMDK uses the
>> BlockDriverState of the raw image file it opened. This is wrong and breaks
>> functions that access the backing file or protocols. This fix replaces all
>> occurrences of s->hd->backing_* with bs->backing_*.
>>
>> This fixes qemu-iotests failure in 020 (Commit changes to backing file).
> 
> Wow, that's an interesting one.  Looks good to me.

Yup, definitely interesting. And it wasn't even consequently wrong:
vmdk_close already used bs->backing_hd.

> Btw, the vmdk seems to assume the backing_hd always is a vmdk image,
> too.  I'm not sure if it is a good assumption.  While the backing_hd is
> found following the parentFileNameHint field in the image there's
> nothing preventing a user / admin from having a different kind of image
> in that place.

Oh, does it? I haven't looked much at it, the fix for the failing test
was so obvious.

Only supporting vmdk as backing file might be debatable (probably still
a bad idea), but if it allows creation of different combination but
can't handle them, it's clearly a bug.

I guess we should have a qemu-iotests case for using different image
formats as backing file.

Kevin

      reply	other threads:[~2009-07-17 10:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17  6:20 [Qemu-devel] [PATCH] vmdk: Fix backing file handling Kevin Wolf
2009-07-17 10:34 ` Christoph Hellwig
2009-07-17 10:53   ` Kevin Wolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A60580D.40905@redhat.com \
    --to=kwolf@redhat.com \
    --cc=hch@lst.de \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).