On Fri, Nov 27, 2009 at 2:48 AM, Chris Webb <[email protected]> wrote:
> MORITA Kazutaka <[email protected]> writes:
>
>> However, bdrv_release doesn't called when we stop a VM using shutdown 
>> command or
>> a signal. I think bdrv_release_all should be called in the exit routine
>> (e.g. at the end of main()).
>
> Hi. You're quite right. There's a bdrv_close_all() in kvm_main_loop that
> needs a bdrv_release_all before it. I note that the non-kvm main loop
> doesn't have a bdrv_close_all() either, just exiting without closing the
> block devices. I've added both a bdrv_release_all and a bdrv_close_all() for
> this case. (This presumably means that sheepdog used to leak locks following
> a shutdown if -no-kvm was given on the command line?)

Yes, locks are not released if kvm is not enabled.
A bdrv_close_all() is what we introduced, and we forgot to add it to
non-kvm main loop.
Your patch looks working correctly, thanks!

> I also forget to correctly wrap qemu-nbd with claim and release calls, so
> I've done this in the next version of the patch too.

How about qemu-img/qemu-io?
These utilities also write data to VM images.
bdrv_claim/release need to be added to qemu-img.c and qemu-io.c, right?

Regards,

MORITA, Kazutaka
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to