I wonder whether pushing the complexity of tevent into the VFS was a good idea?

Andrew Bartlett abartlet at samba.org
Sat Nov 10 17:02:43 MST 2012

On Sat, 2012-11-10 at 10:05 -0800, Richard Sharpe wrote:
> Hi folks,
> I notice that there are now SMB_VFS_PREAD_SEND and SMB_VFS_PREAD_RECV
> VFS interfaces to support AIO, which seems to push the complexity of
> tevent into the VFS.
> Wouldn't, say, an explicit callback model for such things have been
> easier to handle for those who have to implement VFS modules?
> By callback model, I mean that the AIO pread etc interfaces be handed
> a callback, which could simply be aio_pread_smb1_done from the current
> code (with some changes to remove the tevent dependencies.)
> I guess I am trying to figure out what the benefits of the approach of
> pushing complexity into the VFS are that outweighed the advantages of
> a simpler model.
> (Sigh, I am going to have to update the VFS document :-()

One of the challenges is that for each different callback modal (and in
many ways that's exactly what tevent is) we have to translate between
them (if possible) and both teach the rules it follows (specifically how
it gets to know to call the callback) and re-learn the lessons we have
embodied in tevent.

I also find tevent hard to get my head around, but I think it's better
that we stick to that pattern, now we have it. 

In short, while I understand where you are coming from, I'm hesitant to
have another situation like ldb, which has an async modal that isn't
tevent, and which (due to this and other issues, like a primary use case
that is pure sync in any case) has therefore essentially been unable to
be used async in Samba. 

Andrew Bartlett

Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org

More information about the samba-technical mailing list