Native Linux AIO in Samba4

Jeremy Allison jra at
Fri Jan 12 22:50:30 GMT 2007

On Sat, Jan 13, 2007 at 07:56:58AM +1100, tridge at wrote:
> How about merging lib/events into Samba3? There is a cut-down version
> there now, but if the full lib was merged and it was used instead of
> select in the top level event loop in smbd that would gain us the
> following:
>  - you could easily add native Linux aio
>  - it becomes easy to add fd and/or timed events locally in a
>    subsystem of the code without changing the main loop
>  - it is an essential step towards merging the main async libs from
>    Samba4 (rpc, raw smb, nbt, ldap etc)
>  - you can choose event backends at runtime
> The main problem would be signals I think. I've completely avoided
> signals in Samba4 (for all the usual reasons - signals are truly
> horrible). Samba3 still relies on signals so we'd need a
> event_add_signal() call which tries to make signals saner. It would
> need a static signal->handler table as signals can't pass state
> information portably.

I'll take a look at that but it'll be a little tricky to
do and make sure everything keeps working (especially the
sig-safe stuff :-).

It's where I'd like to go ultimately (I don't like the
select loop either :-).


More information about the samba-technical mailing list