函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\truncate.c Create Date:2022-07-27 15:38:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:int invalidate_inode_pages2_range(struct address_space *mapping, unsigned long start, unsigned long end)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
unsigned longstart
unsigned longend
691  ret等于0
692  ret2等于0
693  did_range_unmap等于0
695  如果nrpages恒等于0且nrexceptional恒等于0则转到:out
698  pagevec_init( & pvec)
699  index等于start
700 index小于等于endpagevec_lookup_entries - gang pagecache lookup*@pvec: Where the resulting entries are placed*@mapping: The address_space to search*@start: The starting entry index*@nr_entries: The maximum number of pages*@indices: The cache indices corresponding to the 循环
703 i小于pagevec_count( & pvec)循环
704  page等于pages[i]
707  index等于indices[i]
708  如果index大于end退出
725  如果page_mapped(page)则
726  如果非did_range_unmap
730  unmap_mapping_pages(mapping, index, (1 + end - index), false)
732  did_range_unmap等于1
733  否则
737  unmap_mapping_pages(mapping, index, 1, false)
743  如果ret2恒等于0则
747  如果ret2小于0则ret等于ret2
751  pagevec_remove_exceptionals - pagevec exceptionals pruning*@pvec: The pagevec to prune* pagevec_lookup_entries() fills both pages and exceptional radix* tree entries into the pagevec
752  pagevec_release( & pvec)
753  cond_resched()
754  index自加
763  如果dax_mapping(mapping)则
764  unmap_mapping_pages(mapping, start, end - start + 1, false)
766  out :
767  cleancache_invalidate_inode(mapping)
768  返回:ret
调用者
名称描述
generic_file_direct_write
invalidate_inode_pages2validate_inode_pages2 - remove all pages from an address_space*@mapping: the address_space* Any pages which are found to be mapped into pagetables are unmapped prior to* invalidation.* Return: -EBUSY if any pages could not be invalidated.
dio_completedio_complete() - called when all DIO BIO I/O has been completed* This drops i_dio_count, lets interested parties know that a DIO operation* has completed, and calculates the resulting return code for the operation
dax_iomap_actor
iomap_dio_complete
iomap_dio_rwmap_dio_rw() always completes O_[D]SYNC writes regardless of whether the IO* is being issued as AIO or not. This allows us to optimise pure data writes* to use REQ_FUA rather than requiring generic_write_sync() to issue a* REQ_FLUSH post write
blkdev_fallocate