On Thu, 09 Jan 2020 23:03:37 +0100, Alexander Bluhm wrote:

> That is why I have to keep the list alive while flushing it out.
> So I came to the TAILQ solution.

It seems like the best solution right now.

> > The alternative would be to add another loop around the list processing. I
> > think that's worse because we don't know how many times to keep looping.
>
> There might be a race when TAILQ_FOREACH_SAFE reaches the end, next
> is NULL, but during the final sleep a new vnode is inserted.  Then
> we may miss to flush it.
>
> I think vlfush() should use a while(!TAILQ_EMPTY()) logic.  But I
> don't want to change that in a huge diff.  There are other _SAFE
> macros that are not needed or even unsafe.  I want to convert to
> TAILQ first to be more flexible.  Reversing the list is enough to
> fix my existing panic.

That makes sense.

> > bluhm's diff is the best approach imo. ok me.
>
> I also think this is the easiest step in the right direction.

OK millert@

 - todd

Reply via email to