Lines Matching refs:msg

60 	struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg);  in io_msg_ring_cleanup()  local
62 if (WARN_ON_ONCE(!msg->src_file)) in io_msg_ring_cleanup()
65 fput(msg->src_file); in io_msg_ring_cleanup()
66 msg->src_file = NULL; in io_msg_ring_cleanup()
79 struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); in io_msg_exec_remote() local
85 init_task_work(&msg->tw, func); in io_msg_exec_remote()
86 if (task_work_add(ctx->submitter_task, &msg->tw, TWA_SIGNAL)) in io_msg_exec_remote()
94 struct io_msg *msg = container_of(head, struct io_msg, tw); in io_msg_tw_complete() local
95 struct io_kiocb *req = cmd_to_io_kiocb(msg); in io_msg_tw_complete()
104 if (msg->flags & IORING_MSG_RING_FLAGS_PASS) in io_msg_tw_complete()
105 flags = msg->cqe_flags; in io_msg_tw_complete()
115 if (!io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags)) in io_msg_tw_complete()
129 struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); in io_msg_ring_data() local
133 if (msg->src_fd || msg->flags & ~IORING_MSG_RING_FLAGS_PASS) in io_msg_ring_data()
135 if (!(msg->flags & IORING_MSG_RING_FLAGS_PASS) && msg->dst_fd) in io_msg_ring_data()
143 if (msg->flags & IORING_MSG_RING_FLAGS_PASS) in io_msg_ring_data()
144 flags = msg->cqe_flags; in io_msg_ring_data()
150 if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags)) in io_msg_ring_data()
154 if (io_post_aux_cqe(target_ctx, msg->user_data, msg->len, flags)) in io_msg_ring_data()
162 struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); in io_msg_grab_file() local
165 int idx = msg->src_fd; in io_msg_grab_file()
181 struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); in io_msg_install_complete() local
182 struct file *src_file = msg->src_file; in io_msg_install_complete()
188 ret = __io_fixed_fd_install(target_ctx, src_file, msg->dst_fd); in io_msg_install_complete()
192 msg->src_file = NULL; in io_msg_install_complete()
195 if (msg->flags & IORING_MSG_RING_CQE_SKIP) in io_msg_install_complete()
203 if (!io_post_aux_cqe(target_ctx, msg->user_data, ret, 0)) in io_msg_install_complete()
212 struct io_msg *msg = container_of(head, struct io_msg, tw); in io_msg_tw_fd_complete() local
213 struct io_kiocb *req = cmd_to_io_kiocb(msg); in io_msg_tw_fd_complete()
226 struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); in io_msg_send_fd() local
228 struct file *src_file = msg->src_file; in io_msg_send_fd()
230 if (msg->len) in io_msg_send_fd()
240 msg->src_file = src_file; in io_msg_send_fd()
251 struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); in io_msg_ring_prep() local
256 msg->src_file = NULL; in io_msg_ring_prep()
257 msg->user_data = READ_ONCE(sqe->off); in io_msg_ring_prep()
258 msg->len = READ_ONCE(sqe->len); in io_msg_ring_prep()
259 msg->cmd = READ_ONCE(sqe->addr); in io_msg_ring_prep()
260 msg->src_fd = READ_ONCE(sqe->addr3); in io_msg_ring_prep()
261 msg->dst_fd = READ_ONCE(sqe->file_index); in io_msg_ring_prep()
262 msg->flags = READ_ONCE(sqe->msg_ring_flags); in io_msg_ring_prep()
263 if (msg->flags & ~IORING_MSG_RING_MASK) in io_msg_ring_prep()
271 struct io_msg *msg = io_kiocb_to_cmd(req, struct io_msg); in io_msg_ring() local
278 switch (msg->cmd) { in io_msg_ring()