qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH] block: Close a BlockDriverState completely even


From: Alberto Garcia
Subject: Re: [Qemu-block] [PATCH] block: Close a BlockDriverState completely even when bs->drv is NULL
Date: Mon, 13 Nov 2017 15:03:59 +0100
User-agent: Notmuch/0.18.2 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu)

On Wed 08 Nov 2017 03:33:54 PM CET, Kevin Wolf wrote:
>> This patch makes bdrv_close() do the full uninitialization process in
>> all cases. This fixes the problem with corrupted images and still
>> works fine with freshly created BDSs.
>> 
>> Signed-off-by: Alberto Garcia <address@hidden>
>
> This doesn't apply cleanly in the test case. Does it depend on your
> qcow2 fixes?

Ah, yes. It doesn't have any semantic dependency though, so as long as
you add the new tests to qemu-iotests/060 it will work.

I can resend it properly rebased.

> Also, while I think the change makes sense, it's also clear that we're
> trying to fix up an inconsistent state here. Maybe we could also
> improve the state that block drivers leave behind when marking an
> image as corrupt. Just setting bs->drv = NULL means that at least any
> internal data structures will not get cleaned up.
>
> On the other hand, we can't just call bdrv_close() from a failing
> request because closing requires that we drain the request
> first. Maybe it would be possible to call drv->bdrv_close() with a BH
> or something.

I'm not sure if I'm following you here, where would you add the
bottom-half and what kind of problem it would solve?

Berto



reply via email to

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