struct iocb event_iocb;
ssize_t ret;
struct vfs_aio_state vfs_aio_state;
+ struct timespec start;
};
static struct tevent_req *aio_linux_pread_send(
piocb = &state->event_iocb;
+ clock_gettime_mono(&state->start);
ret = io_submit(io_ctx, 1, &piocb);
if (ret < 0) {
tevent_req_error(req, -ret);
piocb = &state->event_iocb;
+ clock_gettime_mono(&state->start);
ret = io_submit(io_ctx, 1, &piocb);
if (ret < 0) {
tevent_req_error(req, -ret);
piocb = &state->event_iocb;
+ clock_gettime_mono(&state->start);
ret = io_submit(io_ctx, 1, &piocb);
if (ret < 0) {
tevent_req_error(req, -ret);
uint16_t flags, void *private_data)
{
uint64_t num_events = 0;
+ struct timespec end;
DEBUG(10, ("aio_linux_done called with flags=%d\n",
(int)flags));
+ clock_gettime_mono(&end);
+
/* Read the number of events available. */
if (sys_read(event_fd, &num_events, sizeof(num_events)) !=
sizeof(num_events)) {
} else {
state->ret = finished.res;
}
+ state->vfs_aio_state.duration = nsec_time_diff(&end, &state->start);
tevent_req_done(req);
num_events -= 1;
}