Function report |
Source Code:fs\block_dev.c |
Create Date:2022-07-28 20:14:51 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:blkdev_fallocate
Proto:static long blkdev_fallocate(struct file *file, int mode, loff_t start, loff_t len)
Type:long
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file | |
int | mode | |
loff_t | start | |
loff_t | len |
2083 | bdev = I_BDEV(bdev_file_inode(file)) |
2090 | If mode & ~BLKDEV_FALLOC_FL_SUPPORTED Then Return -EOPNOTSUPP |
2098 | If mode & default is extend size Then |
2101 | Else Return -EINVAL |
2108 | If (start | len) & bdev_logical_block_size(bdev) - 1 Then Return -EINVAL |
2116 | Case mode == FALLOC_FL_ZERO_RANGE is used to convert a range of file to zeros preferably* without issuing data IO |
2118 | error = blkdev_issue_zeroout(bdev, start >> 9, len >> 9, GFP_KERNEL, do not free blocks ) |
2120 | Break |
2121 | Case 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 | Break |
2125 | Case mode == de-allocates range | default is extend size | served codepoint |
2126 | error = blkdev_issue_discard(bdev, start >> 9, len >> 9, GFP_KERNEL, 0) |
2128 | Break |
2129 | Default |
2130 | Return -EOPNOTSUPP |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |