Function report |
Source Code:mm\filemap.c |
Create Date:2022-07-28 14:03:04 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Performs necessary checks before doing a clone.* Can adjust amount of bytes to clone via @req_count argument.* Returns appropriate error code that caller should return or* zero in case the clone should be allowed.
Proto:int generic_remap_checks(struct file *file_in, loff_t pos_in, struct file *file_out, loff_t pos_out, loff_t *req_count, unsigned int remap_flags)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct file * | file_in | |
loff_t | pos_in | |
struct file * | file_out | |
loff_t | pos_out | |
loff_t * | req_count | |
unsigned int | remap_flags |
2984 | bs = s_blocksize |
2988 | If Not IS_ALIGNED(pos_in, bs) || Not IS_ALIGNED(pos_out, bs) Then Return -EINVAL |
3007 | count = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(count, size_in - (uint64_t)pos_in) |
3009 | ret = Don't operate on ranges the page cache doesn't support, and don't exceed the* LFS limits. If pos is under the limit it becomes a short access. If it* exceeds the limit we return -EFBIG. |
3021 | bcount = @a is a power of 2 value (size_in, bs) - pos_in |
3022 | Else |
3023 | If Not IS_ALIGNED(count, bs) Then count = ALIGN_DOWN(count, bs) |
3029 | If inode_in == inode_out && pos_out + bcount > pos_in && pos_out < pos_in + bcount Then Return -EINVAL |
3038 | If req_count != count && Not (remap_flags & REMAP_FILE_CAN_SHORTEN) Then Return -EINVAL |
3042 | Return 0 |
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 |