函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blkdev_fallocate

函数原型:static long blkdev_fallocate(struct file *file, int mode, loff_t start, loff_t len)

返回类型:long

参数:

类型参数名称
struct file *file
intmode
loff_tstart
loff_tlen
2083  bdev等于I_BDEV(bdev_file_inode(file))
2085  end等于startlen减1
2090  如果mode按位与BLKDEV_FALLOC_FL_SUPPORTED的反则返回:负EOPNOTSUPP
2094  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
2095  如果start大于等于isize则返回:负EINVAL
2097  如果end大于等于isize
2098  如果mode按位与default is extend size
2099  len等于isizestart
2100  end等于startlen减1
2101  否则返回:负EINVAL
2108  如果start按位或len的值按位与bdev_logical_block_size(bdev)减1则返回:负EINVAL
2112  mapping等于i_mapping
2113  runcate_inode_pages_range - truncate range of pages specified by start & end byte offsets*@mapping: mapping to truncate*@lstart: offset from which to truncate*@lend: offset to which to truncate (inclusive)* Truncate the page cache, removing the pages that
2116  :mode恒等于FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably* without issuing data IO
2117  :mode恒等于FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably* without issuing data IO按位或default is extend size
2118  error等于blkdev_issue_zeroout(bdev, start >> 9, len >> 9, GFP_KERNEL, do not free blocks )
2120  退出
2121  :mode恒等于de-allocates range 按位或default is extend size
2122  error等于blkdev_issue_zeroout(bdev, start >> 9, len >> 9, GFP_KERNEL, don't write explicit zeroes )
2124  退出
2125  :mode恒等于de-allocates range 按位或default is extend size 按位或served codepoint
2126  error等于blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL, 0)
2128  退出
2129  默认
2130  返回:负EOPNOTSUPP
2132  如果error则返回:error
2140  返回: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