Re: git: 4685fa8e4bef - main - aio: handle errors from fork

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 07 Jul 2025 14:23:16 UTC
On 7/5/25 17:19, Konstantin Belousov wrote:
> The branch main has been updated by kib:
> 
> URL: https://cgit.FreeBSD.org/src/commit/?id=4685fa8e4bef169e6a1ceaf07f149232326de805
> 
> commit 4685fa8e4bef169e6a1ceaf07f149232326de805
> Author:     Konstantin Belousov <kib@FreeBSD.org>
> AuthorDate: 2025-07-04 18:30:31 +0000
> Commit:     Konstantin Belousov <kib@FreeBSD.org>
> CommitDate: 2025-07-05 21:18:43 +0000
> 
>      aio: handle errors from fork
>      
>      Do not try to fork forever if fork() failed.  Propagate the error up.
>      
>      Reported and tested by: pho
>      Sponsored by:   The FreeBSD Foundation
>      MFC after:      1 week

I'm not sure this is always correct?  Certainly we should not loop forever,
but as long as one AIO worker exists, it is safe to continue and not report
an error.  Having multiple AIO workers is a performance optimization, not a
functionality requirement.

That is, I think aio_init_aioinfo() should only report an error if
num_aio_procs is zero after the loop.

-- 
John Baldwin