Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\truncate.c Create Date:2022-07-28 14:14:47
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:int invalidate_inode_pages2_range(struct address_space *mapping, unsigned long start, unsigned long end)

Type:int

Parameter:

TypeParameterName
struct address_space *mapping
unsigned longstart
unsigned longend
691  ret = 0
692  ret2 = 0
693  did_range_unmap = 0
695  If nrpages == 0 && nrexceptional == 0 Then Go to out
698  pagevec_init( & pvec)
699  index = start
700  When index <= end && pagevec_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 cycle
703  When i < pagevec_count( & pvec) cycle
704  page = pages[i]
707  index = indices[i]
708  If index > end Then Break
725  If page_mapped(page) Then
726  If Not did_range_unmap Then
730  unmap_mapping_pages(mapping, index, (1 + end - index), false)
732  did_range_unmap = 1
733  Else
737  unmap_mapping_pages(mapping, index, 1, false)
743  If ret2 == 0 Then
747  If ret2 < 0 Then 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  If dax_mapping(mapping) Then
764  unmap_mapping_pages(mapping, start, end - start + 1, false)
766  out :
767  cleancache_invalidate_inode(mapping)
768  Return ret
Caller
NameDescribe
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