函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_req_set_file

函数原型:static int io_req_set_file(struct io_submit_state *state, struct io_kiocb *req, const struct io_uring_sqe *sqe)

返回类型:int

参数:

类型参数名称
struct io_submit_state *state
struct io_kiocb *req
const struct io_uring_sqe *sqe
3398  ctx等于ctx
3402  flags等于READ_ONCE(IOSQE_ flags )
3403  fd等于READ_ONCE(le descriptor to do IO on )
3405  如果flags按位与ssue after inflight IO flags或等于drain existing IO first
3408  ret等于io_req_needs_file(req)
3409  如果ret小于等于0则返回:ret
3412  如果flags按位与use fixed fileset
3413  如果此条件成立可能性小(为编译器优化)(!* If used, fixed file set. Writers must ensure that ->refs is dead, * readers must ensure that ->refs is alive as long as the file* is * used. Only updated through io_uring_register(2). || (unsigned)fd >= nr_user_files)则返回:负EBADF
3416  fd等于array_index_nospec - sanitize an array index after a bounds check* For a code sequence like:* if (index < size) {* index = array_index_nospec(index, size);* val = array[index];* }* (fd, nr_user_files)
3417  file等于io_file_from_index(ctx, fd)
3418  如果非file则返回:负EBADF
3420  flags或等于ctx owns file
3421  否则
3422  如果needs_fixed_file则返回:负EBADF
3424  _uring_file_get - called before getting references to an SQE file*@ctx: pointer to a ring context structure*@fd: SQE file descriptor* Allows to trace out how often an SQE file reference is obtained, which can* help figuring out if it makes sense to use
3425  file等于Get as many references to a file as we have IOs left in this submission,* assuming most submissions are for one file, or at least that each file* has more than one submission.
3426  如果此条件成立可能性小(为编译器优化)(!file)则返回:负EBADF
3430  返回:0
调用者
名称描述
io_submit_sqe