Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\read_write.c Create Date:2022-07-28 20:01:31
Last Modify:2020-03-18 10:18:51 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:vfs_dedupe_file_range

Proto:int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same)

Type:int

Parameter:

TypeParameterName
struct file *file
struct file_dedupe_range *same
2148  src = file_inode(file)
2153  count = - total elements in info array
2156  If Not (f_mode & le is open for reading ) Then Return -EINVAL
2159  If must be zero || must be zero Then Return -EINVAL
2162  off = - start of extent in source
2163  len = - length of extent
2165  If S_ISDIR(i_mode) Then Return -EISDIR
2168  If Not S_ISREG(i_mode) Then Return -EINVAL
2171  If Not remap_file_range Then Return -EOPNOTSUPP
2174  ret = remap_verify_area(file, off, len, false)
2175  If ret < 0 Then Return ret
2177  ret = 0
2179  If off + len > 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 Then Return -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  When i < count cycle
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  When i < count cycle
2192  dst_fd = fdget( - destination file )
2193  dst_file = file
2195  If Not dst_file Then
2197  Go to next_loop
2200  If must be zero Then
2202  Go to next_fdput
2205  deduped = vfs_dedupe_file_range_one(file, off, dst_file, - start of extent in destination , len, REMAP_FILE_CAN_SHORTEN)
2208  If deduped == -EBADE Then ut - see above description = FILE_DEDUPE_RANGE_DIFFERS
2210  Else if deduped < 0 Then ut - see above description = deduped
2212  Else ut - total # of bytes we were able* to dedupe from this file. = len
2215  next_fdput :
2216  fdput(dst_fd)
2217  next_loop :
2218  If fatal_signal_pending(current process) Then Break
2221  Return ret
Caller
NameDescribe
ioctl_file_dedupe_range