Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\io_uring.c Create Date:2022-07-28 20:22:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:io_submit_sqes

Proto: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)

Type:int

Parameter:

TypeParameterName
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  If Not list_empty - tests whether a list is empty*@head: the list to test. && Not Returns true if there are no backlogged entries after the flush Then Return -EBUSY
3792  If nr > IO_PLUG_THRESHOLD Then
3793  Start submission side cache.
3794  statep = state
3797  When i < nr cycle
3802  req = io_get_req(ctx, statep)
3804  If Not submitted Then submitted = -EAGAIN
3806  Break
3809  __io_free_req(req)
3810  Break
3813  If io_req_needs_user(req) && Not mm Then
3815  If Not mm_fault Then
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  If Not io_submit_sqe(req, sqe, statep, & link) Then Break
3838  link = NULL
3842  If link Then io_queue_link_head(link)
3844  If statep Then Batched submission is done, ensure local IO is flushed out.
3848  io_commit_sqring(ctx)
3850  Return submitted
Caller
NameDescribe
io_sq_thread
SYSCALL_DEFINE6