/* only top 8 bits of sqe->uring_cmd_flags for kernel internal use */ #define IORING_URING_CMD_CANCELABLE (1U << 30) /* io_uring_cmd is being issued again */ #define IORING_URING_CMD_REISSUE (1U << 31)
struct io_uring_cmd { struct file *file; conststruct io_uring_sqe *sqe; /* callback to defer completions to task context */ void (*task_work_cb)(struct io_uring_cmd *cmd, unsigned);
u32 cmd_op;
u32 flags;
u8 pdu[32]; /* available inline for free use */
};
#ifdefined(CONFIG_IO_URING) int io_uring_cmd_import_fixed(u64 ubuf, unsignedlong len, int rw, struct iov_iter *iter, struct io_uring_cmd *ioucmd, unsignedint issue_flags); int io_uring_cmd_import_fixed_vec(struct io_uring_cmd *ioucmd, conststruct iovec __user *uvec,
size_t uvec_segs, int ddir, struct iov_iter *iter, unsigned issue_flags);
/* * Completes the request, i.e. posts an io_uring CQE and deallocates @ioucmd * and the corresponding io_uring request. * * Note: the caller should never hard code @issue_flags and is only allowed * to pass the mask provided by the core io_uring code.
*/ void io_uring_cmd_done(struct io_uring_cmd *cmd, ssize_t ret, u64 res2, unsigned issue_flags);
/* * Note: the caller should never hard code @issue_flags and only use the * mask provided by the core io_uring code.
*/ void io_uring_cmd_mark_cancelable(struct io_uring_cmd *cmd, unsignedint issue_flags);
/* Execute the request from a blocking context */ void io_uring_cmd_issue_blocking(struct io_uring_cmd *ioucmd);
/* * Polled completions must ensure they are coming from a poll queue, and * hence are completed inside the usual poll handling loops.
*/ staticinlinevoid io_uring_cmd_iopoll_done(struct io_uring_cmd *ioucmd,
ssize_t ret, ssize_t res2)
{
lockdep_assert(in_task());
io_uring_cmd_done(ioucmd, ret, res2, 0);
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.