函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:vfs_dedupe_file_range

函数原型:int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same)

返回类型:int

参数:

类型参数名称
struct file *file
struct file_dedupe_range *same
2148  src等于file_inode(file)
2153  count等于 - total elements in info array
2156  如果非f_mode按位与le is open for reading 的值则返回:负EINVAL
2159  如果must be zero must be zero 则返回:负EINVAL
2162  off等于 - start of extent in source
2163  len等于 - length of extent
2165  如果S_ISDIR(i_mode)则返回:负EISDIR
2168  如果非S_ISREG(i_mode)则返回:负EINVAL
2171  如果非remap_file_range则返回:负EOPNOTSUPP
2174  ret等于remap_verify_area(file, off, len, false)
2175  如果ret小于0则返回:ret
2177  ret等于0
2179  如果offlen大于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 则返回:负EINVAL
2183  len等于min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, len, 1 << 30)
2186 i小于count循环
2187  ut - total # of bytes we were able* to dedupe from this file. 等于0ULL
2188  ut - see above description 等于xtent-same (dedupe) ioctls; these MUST match the btrfs ioctl definitions
2191 i小于count循环
2192  dst_fd等于fdget( - destination file )
2193  dst_file等于file
2195  如果非dst_file
2197  转到:next_loop
2200  如果must be zero
2202  转到:next_fdput
2205  deduped等于vfs_dedupe_file_range_one(file, off, dst_file, - start of extent in destination , len, REMAP_FILE_CAN_SHORTEN)
2208  如果deduped恒等于负EBADEut - see above description 等于FILE_DEDUPE_RANGE_DIFFERS
2210  否则如果deduped小于0则ut - see above description 等于deduped
2212  否则ut - total # of bytes we were able* to dedupe from this file. 等于len
2215  next_fdput :
2216  fdput(dst_fd)
2217  next_loop :
2218  如果fatal_signal_pending(当前进程)则退出
2221  返回:ret
调用者
名称描述
ioctl_file_dedupe_range