vfs/time_audit: use duration we get from the async backend
authorRalph Boehme <slow@samba.org>
Fri, 26 Feb 2016 11:54:23 +0000 (12:54 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 2 Mar 2016 00:22:14 +0000 (01:22 +0100)
commit7054217a790c8d051d78aa7ee6b0144b3f1f55a0
treea5ce77646761de79665274571b1a7471b04b0c60
parentd8f71a43c37b1c59bb79b5afe6c9daefada95503
vfs/time_audit: use duration we get from the async backend

Finally! The previous commits changed the VFS and the async backend to
pass the duration of an aync operation up the stack.

We now can use this value instead of doing our own sampling which avoids
the following problem:

1. SMB2 read request received, added to the async queue

2. SMB2 create_file request comes in, is processed and blocks for N
   seconds in open()

3. async read completes in the dispatcher thread, completion callback
   will be called when we enter the main tevent loop

4. open() completes after N seconds

5. main tevent event loop is entered, async results are processed

6. async read result is processed, time sampling will include the N
   seconds blocked in open()

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/modules/vfs_time_audit.c