函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\read_write.c Create Date:2022-07-29 10:31:32
Last Modify:2020-03-18 10:18:51 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Ensure that we don't remap a partial EOF block in the middle of something* else. Assume that the offsets have already been checked for block* alignment.* For clone we only link a partial EOF block above or at the destination file's* EOF

函数原型:static int generic_remap_check_len(struct inode *inode_in, struct inode *inode_out, loff_t pos_out, loff_t *len, unsigned int remap_flags)

返回类型:int

参数:

类型参数名称
struct inode *inode_in
struct inode *inode_out
loff_tpos_out
loff_t *len
unsigned intremap_flags
1792  blkmask等于i_blocksize(inode_in)减1
1793  new_len等于len
1795  如果len按位与blkmask的值恒等于0则返回:0
1798  如果pos_outlen小于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 new_len与等于blkmask的反
1801  如果new_len恒等于len则返回:0
1804  如果remap_flags按位与REMAP_FILE_CAN_SHORTEN
1805  len等于new_len
1806  返回:0
1809  返回:如果remap_flags按位与These flags control the behavior of the remap_file_range function pointer.* If it is called with len == 0 that means "remap to end of source file".* See Documentation/filesystems/vfs.rst for more details about this call.则负EBADE否则负EINVAL
调用者
名称描述
generic_remap_file_range_prepCheck that the two inodes are eligible for cloning, the ranges make* sense, and then flush all dirty data. Caller must ensure that the* inodes have been locked against any other modifications.