函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-29 10:55:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:io_submit_sqes

函数原型:static int io_submit_sqes(struct io_ring_ctx *ctx, unsigned int nr, struct file *ring_file, int ring_fd, struct mm_struct **mm, bool async)

返回类型:int

参数:

类型参数名称
struct io_ring_ctx *ctx
unsigned intnr
struct file *ring_file
intring_fd
struct mm_struct **mm
boolasync
3782  struct io_submit_state state, * statep = NULL
3783  struct io_kiocb * link = NULL
3784  submitted等于0
3785  bool mm_fault = false
3788  如果非链表为空且非Returns true if there are no backlogged entries after the flush 则返回:负EBUSY
3792  如果nr大于IO_PLUG_THRESHOLD
3793  Start submission side cache.
3794  statep等于state
3797 i小于nr循环
3802  req等于io_get_req(ctx, statep)
3804  如果非submittedsubmitted等于负EAGAIN
3806  退出
3809  __io_free_req(req)
3810  退出
3813  如果io_req_needs_user(req)且非mm
3815  如果非mm_fault
3821  submitted自加
3822  sqe_flags等于IOSQE_ flags
3824  ring_file等于ring_file
3825  ring_fd等于ring_fd
3826  has_user = * mm != NULL
3827  in_async等于async
3828  needs_fixed_file等于async
3829  _uring_submit_sqe - called before submitting one SQE*@ctx: pointer to a ring context structure*@user_data: user data associated with the request*@force_nonblock: whether a context blocking or not*@sq_thread: true if sq_thread has submitted this SQE*
3830  如果非io_submit_sqe(req, sqe, statep, & link)则退出
3836  如果非sqe_flags按位与links next sqe 按位或like LINK, but stronger 的值的值且link
3838  link = NULL
3842  如果linkio_queue_link_head(link)
3844  如果statepBatched submission is done, ensure local IO is flushed out.
3848  io_commit_sqring(ctx)
3850  返回:submitted
调用者
名称描述
io_sq_thread
SYSCALL_DEFINE6