函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dax_iomap_actor

函数原型:static loff_t dax_iomap_actor(struct inode *inode, loff_t pos, loff_t length, void *data, struct iomap *iomap, struct iomap *srcmap)

返回类型:loff_t

参数:

类型参数名称
struct inode *inode
loff_tpos
loff_tlength
void *data
struct iomap *iomap
struct iomap *srcmap
1096  bdev等于 block device for I/O
1097  dax_dev等于 dax_dev for dax operations
1098  iter等于data
1099  end等于poslength, done等于0
1100  ret等于0
1104  如果iov_iter_rw(iter)恒等于generic data direction definitions
1105  end等于两数取小(end, NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they )
1106  如果pos大于等于end则返回:0
1109  如果 type of mapping 恒等于 blocks allocated, need allocation type of mapping 恒等于locks allocated at @addr in unwritten state 则返回:iov_iter_zero(两数取小(length, end - pos), iter)
1113  如果WARN_ON_ONCE( type of mapping != locks allocated at @addr )则返回:负EIO
1121  如果 flags for mapping 按位与Flags reported by the file system from iomap_begin:* IOMAP_F_NEW indicates that the blocks have been newly allocated and need* zeroing for areas that no data is copied to.* IOMAP_F_DIRTY indicates the inode has uncommitted metadata needed to access
1122  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
1127  id等于dax_read_lock()
1128 pos小于end循环
1129  offset等于pos按位与PAGE_SIZE减1
1130  size等于@a is a power of 2 value (length + offset, PAGE_SIZE)
1131  sector等于dax_iomap_sector(iomap, pos)
1137  ret等于负EINTR
1138  退出
1141  ret等于bdev_dax_pgoff(bdev, sector, size, & pgoff)
1142  如果ret退出
1145  map_len等于dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), & kaddr, NULL)
1147  如果map_len小于0则
1148  ret等于map_len
1149  退出
1152  map_len等于PFN_PHYS(map_len)
1153  kaddr加等于offset
1154  map_len减等于offset
1155  如果map_len大于endposmap_len等于endpos
1163  如果iov_iter_rw(iter)恒等于WRITExfer等于dax_copy_from_iter(dax_dev, pgoff, kaddr, map_len, iter)
1166  否则xfer等于dax_copy_to_iter(dax_dev, pgoff, kaddr, map_len, iter)
1170  pos加等于xfer
1171  length减等于xfer
1172  done加等于xfer
1174  如果xfer恒等于0则ret等于负EFAULT
1176  如果xfer小于map_len退出
1179  dax_read_unlock(id)
1181  返回:如果donedone否则ret