[PATCH] Enhance time sampling of async IO VFS functions

Jeremy Allison jra at samba.org
Fri Feb 26 18:45:31 UTC 2016


On Fri, Feb 26, 2016 at 06:39:36PM +0100, Ralph Boehme wrote:
> On Fri, Feb 26, 2016 at 09:12:05AM -0800, Jeremy Allison wrote:
> > 
> > I like what you're trying to do but I *hate* adding the extra
> > arg to the VFS functions. Can we think of any other way to do
> > this ?
> 
> We could also just use one pointer arg to a struct vfs_aio_state or
> similar, instead of keep adding args over the years.

So if we want to fix this just in smbd, the above is the correct
way to do it. If you want to rewrite using that approach
I'd be happy to review. I'm happy to use this until (or if :-)
we get agreement on the approach below.

> I though about adding struct tevent_req.async.(uint64_t)duration and
> getter/setter functions
> tevent_req_set_duration()/tevent_req_get_duration().
> 
> This could then be used by the implementation of an async request to
> set the duration and the caller can read it, further passing up the
> stack and processing as needed.

If we want to make this a generic feature of tevent, then
the above is the way to go - but I think that needs a bigger
discussion than just you and I.

Metze, Volker - what do you think about adding duration
as a feature to tevent_req.async ?

Cheers,

	Jeremy.



More information about the samba-technical mailing list