函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:io_issue_sqe

函数原型:static int io_issue_sqe(struct io_kiocb *req, const struct io_uring_sqe *sqe, struct io_kiocb **nxt, bool force_nonblock)

返回类型:int

参数:

类型参数名称
struct io_kiocb *req
const struct io_uring_sqe *sqe
struct io_kiocb **nxt
boolforce_nonblock
3184  ctx等于ctx
3188  :opcode恒等于IORING_OP_NOP
3189  ret等于IORING_OP_NOP just posts a completion event, nothing else.
3190  退出
3191  :opcode恒等于IORING_OP_READV
3192  :opcode恒等于IORING_OP_READ_FIXED
3193  如果sqe
3195  如果ret小于0则退出
3198  ret等于io_read(req, nxt, force_nonblock)
3199  退出
3200  :opcode恒等于IORING_OP_WRITEV
3201  :opcode恒等于IORING_OP_WRITE_FIXED
3202  如果sqe
3204  如果ret小于0则退出
3207  ret等于io_write(req, nxt, force_nonblock)
3208  退出
3209  :opcode恒等于IORING_OP_FSYNC
3210  如果sqe
3211  ret等于io_prep_fsync(req, sqe)
3212  如果ret小于0则退出
3215  ret等于io_fsync(req, nxt, force_nonblock)
3216  退出
3217  :opcode恒等于IORING_OP_POLL_ADD
3218  如果sqe
3219  ret等于io_poll_add_prep(req, sqe)
3220  如果ret退出
3223  ret等于io_poll_add(req, nxt)
3224  退出
3225  :opcode恒等于IORING_OP_POLL_REMOVE
3226  如果sqe
3227  ret等于io_poll_remove_prep(req, sqe)
3228  如果ret小于0则退出
3231  ret等于Find a running poll command that matches one specified in sqe->addr,* and remove it if found.
3232  退出
3233  :opcode恒等于IORING_OP_SYNC_FILE_RANGE
3234  如果sqe
3235  ret等于io_prep_sfr(req, sqe)
3236  如果ret小于0则退出
3239  ret等于io_sync_file_range(req, nxt, force_nonblock)
3240  退出
3241  :opcode恒等于IORING_OP_SENDMSG
3242  如果sqe
3243  ret等于io_sendmsg_prep(req, sqe)
3244  如果ret小于0则退出
3247  ret等于io_sendmsg(req, nxt, force_nonblock)
3248  退出
3249  :opcode恒等于IORING_OP_RECVMSG
3250  如果sqe
3251  ret等于io_recvmsg_prep(req, sqe)
3252  如果ret退出
3255  ret等于io_recvmsg(req, nxt, force_nonblock)
3256  退出
3257  :opcode恒等于IORING_OP_TIMEOUT
3258  如果sqe
3259  ret等于io_timeout_prep(req, sqe, false)
3260  如果ret退出
3263  ret等于io_timeout(req)
3264  退出
3265  :opcode恒等于IORING_OP_TIMEOUT_REMOVE
3266  如果sqe
3268  如果ret退出
3271  ret等于Remove or update an existing timeout command
3272  退出
3273  :opcode恒等于IORING_OP_ACCEPT
3274  如果sqe
3275  ret等于io_accept_prep(req, sqe)
3276  如果ret退出
3279  ret等于io_accept(req, nxt, force_nonblock)
3280  退出
3281  :opcode恒等于IORING_OP_CONNECT
3282  如果sqe
3283  ret等于io_connect_prep(req, sqe)
3284  如果ret退出
3287  ret等于io_connect(req, nxt, force_nonblock)
3288  退出
3289  :opcode恒等于IORING_OP_ASYNC_CANCEL
3290  如果sqe
3292  如果ret退出
3295  ret等于io_async_cancel(req, nxt)
3296  退出
3297  默认
3298  ret等于负EINVAL
3299  退出
3302  如果ret则返回:ret
3305  如果flags按位与_context is polled
3306  in_async等于io_wq_current_is_worker()
3308  如果result恒等于负EAGAIN则返回:负EAGAIN
3312  如果in_asyncmutex_lock( & uring_lock)
3315  After the iocb has been issued, it's safe to be found on the poll list.* Adding the kiocb to the list AFTER submission ensures that we don't* find it from a io_iopoll_getevents() thread before the issuer is done* accessing the kiocb cookie.
3317  如果in_asyncmutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
3321  返回:0
调用者
名称描述
io_wq_submit_work
__io_queue_sqe