函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:aio_prep_rw

函数原型:static int aio_prep_rw(struct kiocb *req, const struct iocb *iocb)

返回类型:int

参数:

类型参数名称
struct kiocb *req
const struct iocb *iocb
1449  ki_complete等于aio_complete_rw
1450  private = NULL
1451  文件偏移等于读写操作对应的文件偏移
1452  ki_flags等于iocb_flags(文件指针)
1453  如果异步请求处理完成时使用eventfd进行通知按位与Valid flags for the "aio_flags" member of the "struct iocb".* IOCB_FLAG_RESFD - Set if the "aio_resfd" member of the "struct iocb"* is valid.* IOCB_FLAG_IOPRIO - Set if the "aio_reqprio" member of the "struct iocb"* is valid.ki_flags或等于IOCB_EVENTFD
1455  ki_hint等于ki_hint_validate(file_write_hint(文件指针))
1456  如果异步请求处理完成时使用eventfd进行通知按位与IOCB_FLAG_IOPRIO
1462  ret等于ioprio_check_cap(aio_reqprio)
1463  如果ret
1464  pr_debug("aio ioprio check cap error: %d\n", ret)
1465  返回:ret
1468  See linux/ioprio.h 等于aio_reqprio
1469  否则 See linux/ioprio.h 等于If the calling process has set an I/O priority, use that. Otherwise, return* the default I/O priority.
1472  ret等于kiocb_set_rw_flags(req, RWF_* flags )
1473  如果此条件成立可能性小(为编译器优化)(ret)则返回:ret
1476  ki_flags与等于IOCB_HIPRI的反
1477  返回:0
调用者
名称描述
aio_read
aio_write