函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lemap_range_has_page - check if a page exists in range

函数原型:bool filemap_range_has_page(struct address_space *mapping, loff_t start_byte, loff_t end_byte)

返回类型:bool

参数:

类型参数名称
struct address_space *mapping
loff_tstart_byte
loff_tend_byte
476  XA_STATE() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.* Declare and initialise an xa_state on the stack.(xas, & i_pages, start_byte >> PAGE_SHIFT determines the page size )
477  max等于end_byte右移PAGE_SHIFT determines the page size
479  如果end_byte小于start_byte则返回:false
482  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
483  循环
484  page等于xas_find() - Find the next present entry in the XArray
485  如果xas_retry() - Retry the operation if appropriate.*@xas: XArray operation state.*@entry: Entry from xarray.* The advanced functions may sometimes return an internal entry, such as* a retry entry or a zero entry. This function sets up the @xas to restart则继续下一循环
488  如果xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.则继续下一循环
495  退出
497  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
499  返回:page != NULL
调用者
名称描述
generic_file_read_itergeneric_file_read_iter - generic filesystem read routine*@iocb: kernel I/O control block*@iter: destination for the data read* This is the "read_iter()" routine for all filesystems* that can use the page cache directly
generic_file_direct_write
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