qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vmdk: Fix backing file handling


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH] vmdk: Fix backing file handling
Date: Fri, 17 Jul 2009 12:53:01 +0200
User-agent: Thunderbird 2.0.0.21 (X11/20090320)

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 via email to

[Prev in Thread] Current Thread [Next in Thread]