qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Open by references and close on exit


From: Max Reitz
Subject: Re: [Qemu-devel] Open by references and close on exit
Date: Thu, 13 Feb 2014 19:05:50 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

Hi Benoît,

Hm, opening a reference should only result in the refcount of the respective BDS being incremented through bdrv_ref(). Since no new BDS is created, nothing should be added to bdrv_states. When the BDS “closed” through bdrv_unref(), it is only actually closed/deleted if the refcount reaches zero. Until then, it remains in bdrv_states so it can be referenced (since it has not been closed) and closed through bdrv_close_all().

I don't really see how bdrv_close_all() closes the BDS “a second time” – bdrv_unref() should only close the BDS if its refcount reaches zero. And if that's the case, it should be removed from bdrv_states anyway.


Kind regards,

Max



reply via email to

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