函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Calculate the range inside the page that we actually need to read.

函数原型:static void iomap_adjust_read_range(struct inode *inode, struct iomap_page *iop, loff_t *pos, loff_t length, unsigned *offp, unsigned *lenp)

返回类型:void

参数:

类型参数名称
struct inode *inode
struct iomap_page *iop
loff_t *pos
loff_tlength
unsigned *offp
unsigned *lenp
90  orig_pos等于pos
91  isize等于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
92  block_bits等于i_blkbits
93  block_size等于1左移block_bits
94  poff等于offset_in_page( * pos)
95  plen等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(loff_t, PAGE_SIZE - poff, length)
96  first等于poff右移block_bits
97  last等于poffplen减1右移block_bits
104  如果iop
108 i小于等于last循环
111  pos加等于block_size
112  poff加等于block_size
113  plen减等于block_size
114  first自加
118 i小于等于last循环
120  plen减等于lasti加1的和乘block_size
121  last等于i减1
122  退出
132  如果orig_pos小于等于isizeorig_poslength大于isize
133  end等于offset_in_page(isize - 1)右移block_bits
135  如果first小于等于endlast大于endplen减等于lastend的差乘block_size
139  offp等于poff
140  lenp等于plen
调用者
名称描述
iomap_readpage_actor
__iomap_write_begin