struct tevent_req *req;
bool cancelled;
struct vfs_aio_state vfs_aio_state;
+ struct timespec start;
};
static int aio_wrapper_destructor(struct glusterfs_aio_wrapper *wrap)
{
struct glusterfs_aio_state *state = NULL;
int sts = 0;
+ struct timespec end;
state = (struct glusterfs_aio_state *)data;
+ clock_gettime_mono(&end);
+
if (ret < 0) {
state->ret = -1;
state->vfs_aio_state.error = errno;
} else {
state->ret = ret;
}
+ state->vfs_aio_state.duration = nsec_time_diff(&end, &state->start);
/*
* Write the state pointer to glusterfs_aio_state to the
return tevent_req_post(req, ev);
}
+ clock_gettime_mono(&state->start);
ret = glfs_pread_async(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle,
fsp), data, n, offset, 0, aio_glusterfs_done,
state);
return tevent_req_post(req, ev);
}
+ clock_gettime_mono(&state->start);
ret = glfs_pwrite_async(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle,
fsp), data, n, offset, 0, aio_glusterfs_done,
state);
tevent_req_error(req, EIO);
return tevent_req_post(req, ev);
}
+
+ clock_gettime_mono(&state->start);
ret = glfs_fsync_async(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle,
fsp), aio_glusterfs_done, req);
if (ret < 0) {