[Top][All Lists]

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

Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when drai

From: Kevin Wolf
Subject: Re: [Qemu-devel] [PATCH for-2.11] block: Keep strong reference when draining all BDS
Date: Fri, 10 Nov 2017 17:05:12 +0100
User-agent: Mutt/1.9.1 (2017-09-22)

Am 10.11.2017 um 16:23 hat Max Reitz geschrieben:
> On 2017-11-10 14:32, Fam Zheng wrote:
> > On Fri, 11/10 14:17, Kevin Wolf wrote:
> >> Do you actually need to keep references to all BDSes in the whole list
> >> while using the iterator or would it be enough to just keep a reference
> >> to the current one?
> > 
> > To fix the bug we now see I think keeping the current is enough, but I think
> > implementing just like this patch is also good with some future-proofing: we
> > cannot know what will be wedged into the nexted aio_poll()'s over time (and 
> > yes,
> > we should really reduce the number of them.)
> I don't really want to think about whether it's safe to only keep a
> reference to the current BDS.  I can't imagine any case where destroying
> one root BDS leads to destroying another, but I'd rather be safe and not
> have to think about it.  (Unless there is an important reason to only
> keep a strong reference to the current one.)

Why would it be a problem if another BDS from the list went away? If it
is one that was already processed, we don't care, and if it was in the
yet unprocessed part of the list, we'll just never return it.


Attachment: signature.asc
Description: PGP signature

reply via email to

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