*/
lp_do_parameter(SNUM(handle->conn), "shadow:mountpoint", "/");
+ /*
+ * Unless we have an async implementation of getxattrat turn this off.
+ */
+ lp_do_parameter(SNUM(handle->conn), "smbd:async dosmode", "false");
+
done:
if (ret < 0) {
if (fs)
read_fd = fds[0];
write_fd = fds[1];
- aio_read_event = tevent_add_fd(handle->conn->sconn->ev_ctx,
+ /*
+ * We use the raw tevent context here,
+ * as this is a global event handler.
+ *
+ * The tevent_req_defer_callback()
+ * calls will make sure the results
+ * of async calls are propagated
+ * to the correct tevent_context.
+ */
+ aio_read_event = tevent_add_fd(handle->conn->sconn->raw_ev_ctx,
NULL,
read_fd,
TEVENT_FD_READ,
return tevent_req_post(req, ev);
}
+ /*
+ * aio_glusterfs_done and aio_tevent_fd_done()
+ * use the raw tevent context. We need to use
+ * tevent_req_defer_callback() in order to
+ * use the event context we're started with.
+ */
+ tevent_req_defer_callback(req, ev);
+
PROFILE_TIMESTAMP(&state->start);
ret = glfs_pread_async(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle,
fsp), data, n, offset, 0, aio_glusterfs_done,
return tevent_req_post(req, ev);
}
+ /*
+ * aio_glusterfs_done and aio_tevent_fd_done()
+ * use the raw tevent context. We need to use
+ * tevent_req_defer_callback() in order to
+ * use the event context we're started with.
+ */
+ tevent_req_defer_callback(req, ev);
+
PROFILE_TIMESTAMP(&state->start);
ret = glfs_pwrite_async(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle,
fsp), data, n, offset, 0, aio_glusterfs_done,
return tevent_req_post(req, ev);
}
+ /*
+ * aio_glusterfs_done and aio_tevent_fd_done()
+ * use the raw tevent context. We need to use
+ * tevent_req_defer_callback() in order to
+ * use the event context we're started with.
+ */
+ tevent_req_defer_callback(req, ev);
+
PROFILE_TIMESTAMP(&state->start);
ret = glfs_fsync_async(*(glfs_fd_t **)VFS_FETCH_FSP_EXTENSION(handle,
fsp), aio_glusterfs_done, state);
/* EA Operations */
.getxattr_fn = vfs_gluster_getxattr,
+ .getxattrat_send_fn = vfs_not_implemented_getxattrat_send,
+ .getxattrat_recv_fn = vfs_not_implemented_getxattrat_recv,
.fgetxattr_fn = vfs_gluster_fgetxattr,
.listxattr_fn = vfs_gluster_listxattr,
.flistxattr_fn = vfs_gluster_flistxattr,