函数逻辑报告 | 
Source Code:mm\truncate.c | 
Create Date:2022-07-27 15:38:19 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| 首页 | 函数Tree | 
| 注解内核,赢得工具 | 下载SCCT | English | 
函数名称: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
函数原型:void truncate_inode_pages_range(struct address_space *mapping, loff_t lstart, loff_t lend)
返回类型:void
参数:
| 类型 | 参数 | 名称 | 
|---|---|---|
| struct address_space * | mapping | |
| loff_t | lstart | |
| loff_t | lend | 
| 303 | 如果nrpages恒等于0且nrexceptional恒等于0则转到:out | 
| 307 | partial_start等于lstart按位与PAGE_SIZE减1 | 
| 308 | partial_end等于lend加1按位与PAGE_SIZE减1 | 
| 324 | 否则end等于lend加1右移PAGE_SHIFT determines the page size 位 | 
| 327 | pagevec_init( & pvec) | 
| 339 | pagevec_init( & locked_pvec) | 
| 340 | 以i小于pagevec_count( & pvec)循环 | 
| 351 | 如果非Return true if the page was successfully locked则继续下一循环 | 
| 353 | WARN_ON(Get index of the page with in radix-tree* (TODO: remove once hugetlb pages will have ->index in PAGE_SIZE) != index) | 
| 358 | 如果 See page-flags.h for PAGE_MAPPING_FLAGS 不等于mapping则 | 
| 364 | 以i小于pagevec_count( & locked_pvec)循环If truncate cannot remove the fs-private metadata from the page, the page* becomes orphaned | 
| 370 | pagevec_release( & pvec) | 
| 371 | cond_resched() | 
| 372 | index自加 | 
| 374 | 如果partial_start则 | 
| 376 | 如果page则 | 
| 380 | top等于partial_end | 
| 381 | partial_end等于0 | 
| 384 | zero_user_segment(page, partial_start, top) | 
| 393 | 如果partial_end则 | 
| 395 | 如果page则 | 
| 414 | 循环 | 
| 415 | cond_resched() | 
| 428 | pagevec_release( & pvec) | 
| 429 | 退出 | 
| 432 | 以i小于pagevec_count( & pvec)循环 | 
| 447 | WARN_ON(Get index of the page with in radix-tree* (TODO: remove once hugetlb pages will have ->index in PAGE_SIZE) != index) | 
| 449 | truncate_inode_page(mapping, page) | 
| 453 | pagevec_release( & pvec) | 
| 454 | index自加 | 
| 457 | out : | 
| 名称 | 描述 | 
|---|---|
| truncate_inode_pages | runcate_inode_pages - truncate *all* the pages from an offset*@mapping: mapping to truncate*@lstart: offset from which to truncate* Called under (and serialised by) inode->i_mutex.* Note: When this function returns, there can be a page in the process of | 
| truncate_pagecache_range | runcate_pagecache_range - unmap and remove pagecache that is hole-punched*@inode: inode*@lstart: offset of beginning of hole*@lend: offset of last byte of hole* This function should typically be called before the filesystem | 
| shmem_truncate_range | |
| blk_ioctl_zeroout | |
| blk_ioctl_discard | |
| blkdev_fallocate | 
| 源代码转换工具 开放的插件接口  | X | 
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码  |