qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v4 0/7] file descriptor passing using pass-fd


From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH v4 0/7] file descriptor passing using pass-fd
Date: Fri, 06 Jul 2012 11:06:41 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20120605 Thunderbird/13.0

Am 05.07.2012 18:37, schrieb Corey Bryant:
>>>>> There is one case I'm aware of where we need to be careful: Before
>>>>> opening an image, qemu may probe the format. In this case, the image
>>>>> gets opened twice, and the first close comes before the second open.
>>>>> I'm
>>>>> not entirely sure how hard it would be to get rid of that behaviour.
>>>>>
>>>>> If we can't get rid of it, we have a small window that the refcount
>>>>> doesn't really cover, and if we weren't careful it would become racy.
>>>>> This is why I mentioned earlier that maybe we need to defer the
>>>>> refcount
>>>>> decrease a bit. However, I can't see how the in-use flag would make a
>>>>> difference there. If the refcount can't cover it, the in-use flag can't
>>>>> either.
>>>>
>>>> Yeah this is a problem.  Could we introduce another flag to cover this?
>>>
>>> Adding more refcounts or flags is not a problem, but it doesn't solve it
>>> either. The hard question is when to set that flag.
>>>
>>> I believe it may be easier to just change the block layer so that it
>>> opens files only once during bdrv_open().
> 
> Can this fix be delivered after the fd passing patch series?

Sure, we can't fix everything at once.

Kevin



reply via email to

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