}
struct vfswrap_offload_write_state {
- struct tevent_context *ev;
uint8_t *buf;
bool read_lck_locked;
bool write_lck_locked;
DATA_BLOB *token;
+ struct tevent_context *src_ev;
struct files_struct *src_fsp;
off_t src_off;
+ struct tevent_context *dst_ev;
struct files_struct *dst_fsp;
off_t dst_off;
off_t to_copy;
}
*state = (struct vfswrap_offload_write_state) {
- .ev = ev,
.token = token,
.src_off = transfer_offset,
+ .dst_ev = ev,
.dst_fsp = dest_fsp,
.dst_off = dest_off,
.to_copy = to_copy,
if (tevent_req_nterror(req, status)) {
return tevent_req_post(req, ev);
}
- state->src_fsp = src_fsp;
DBG_DEBUG("server side copy chunk of length %" PRIu64 "\n", to_copy);
return tevent_req_post(req, ev);
}
+ state->src_ev = state->src_fsp->conn->sconn->ev_ctx;
+ state->src_fsp = src_fsp;
+
state->buf = talloc_array(state, uint8_t, num);
if (tevent_req_nomem(state->buf, req)) {
return tevent_req_post(req, ev);
}
subreq = SMB_VFS_PREAD_SEND(state,
- state->src_fsp->conn->sconn->ev_ctx,
+ state->src_ev,
state->src_fsp,
state->buf,
state->next_io_size,
}
subreq = SMB_VFS_PWRITE_SEND(state,
- state->ev,
+ state->dst_ev,
state->dst_fsp,
state->buf,
state->next_io_size,