函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:iomap_dio_complete

函数原型:static ssize_t iomap_dio_complete(struct iomap_dio *dio)

返回类型:ssize_t

参数:

类型参数名称
struct iomap_dio *dio
75  dops等于dops
76  iocb等于iocb
77  inode等于file_inode(文件指针)
78  offset等于文件偏移
79  ret等于error
81  如果dopsend_ioret等于end_io(iocb, size, ret, flags)
84  如果此条件成立可能性大(为编译器优化)(!ret)则
85  ret等于size
87  如果offsetret大于i_size且非flags按位与IOMAP_DIO_WRITE的值则ret等于i_sizeoffset
90  文件偏移加等于ret
105  如果非errorflags按位与IOMAP_DIO_WRITEnrpages
108  err等于validate_inode_pages2_range - remove range of pages from an address_space*@mapping: the address_space*@start: the page offset 'from' which to invalidate*@end: the page offset 'to' which to invalidate (inclusive)* Any pages which are found to be mapped
111  如果errWarn about a page cache invalidation failure during a direct I/O write.
119  如果ret大于0且flags按位与IOMAP_DIO_NEED_SYNCret等于Sync the bytes written if this was a synchronous write. Expect ki_pos* to already be updated for the write, and will return either the amount* of bytes passed in, or an error if syncing the file failed.
122  结束I/O信号请求
123  释放内存
125  返回:ret
调用者
名称描述
iomap_dio_complete_work
iomap_dio_rwmap_dio_rw() always completes O_[D]SYNC writes regardless of whether the IO* is being issued as AIO or not. This allows us to optimise pure data writes* to use REQ_FUA rather than requiring generic_write_sync() to issue a* REQ_FLUSH post write