函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Execute a iomap write on a segment of the mapping that spans a* contiguous range of pages that have identical block mapping state

函数原型:loff_t iomap_apply(struct inode *inode, loff_t pos, loff_t length, unsigned flags, const struct iomap_ops *ops, void *data, iomap_actor_t actor)

返回类型:loff_t

参数:

类型参数名称
struct inode *inode
loff_tpos
loff_tlength
unsignedflags
const struct iomap_ops *ops
void *data
iomap_actor_tactor
27  struct iomap iomap = { type of mapping = blocks allocated, need allocation }
28  struct iomap srcmap = { type of mapping = blocks allocated, need allocation }
29  written等于0
32  trace_iomap_apply(inode, pos, length, flags, ops, actor, _RET_IP_)
46  ret等于iomap_begin(inode, pos, length, flags, & iomap, & srcmap)
47  如果ret则返回:ret
49  如果WARN_ON( file offset of mapping, bytes > pos)则返回:负EIO
51  如果WARN_ON( length of mapping, bytes == 0)则返回:负EIO
54  trace_iomap_apply_dstmap(inode, & iomap)
55  如果 type of mapping 不等于 blocks allocated, need allocation trace_iomap_apply_srcmap(inode, & srcmap)
62  end等于 file offset of mapping, bytes length of mapping, bytes
63  如果 type of mapping 不等于 blocks allocated, need allocation end等于两数取小(end, file offset of mapping, bytes + length of mapping, bytes )
65  如果poslength大于endlength等于endpos
80  written等于actor(inode, pos, length, data, & iomap, type of mapping != blocks allocated, need allocation ? & srcmap : & iomap)
87  如果iomap_end
88  ret等于iomap_end(inode, pos, length, written > 0 ? written : 0, flags, & iomap)
93  返回:如果writtenwritten否则ret
调用者
名称描述
iomap_readpage
iomap_readpages
iomap_file_buffered_write
iomap_file_unshare
iomap_zero_range
iomap_page_mkwrite
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
iomap_fiemap
iomap_bmaplegacy ->bmap interface. 0 is the error return (!)
iomap_seek_hole
iomap_seek_data
iomap_swapfile_activateIterate a swap file's iomaps to construct physical extents that can be* passed to the swapfile subsystem.