函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\dax.c Create Date:2022-07-29 10:56:25
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:By this point grab_mapping_entry() has ensured that we have a locked entry* of the appropriate size so we don't have to worry about downgrading PMDs to* PTEs

函数原型:static void *dax_insert_entry(struct xa_state *xas, struct address_space *mapping, struct vm_fault *vmf, void *entry, pfn_t pfn, unsigned long flags, bool dirty)

返回类型:void

参数:

类型参数名称
struct xa_state *xas
struct address_space *mapping
struct vm_fault *vmf
void *entry
pfn_tpfn
unsigned longflags
booldirty
720  new_entry等于dax_make_entry(pfn, flags)
722  如果dirty__mark_inode_dirty - internal function*@inode: inode to mark*@flags: what kind of dirty (i
725  如果dax_is_zero_entry(entry)且非flags按位与DAX_ZERO_PAGE的值则
726  index等于xa_index
728  如果dax_is_pmd_entry(entry)则map_mapping_pages() - Unmap pages from processes.*@mapping: The address space containing pages to be unmapped.*@start: Index of first page to be unmapped.*@nr: Number of pages to be unmapped. 0 to unmap to end of file.
731  否则map_mapping_pages() - Unmap pages from processes.*@mapping: The address space containing pages to be unmapped.*@start: Index of first page to be unmapped.*@nr: Number of pages to be unmapped. 0 to unmap to end of file.
735  xas_reset() - Reset an XArray operation state.*@xas: XArray operation state.* Resets the error or walk state of the @xas so future walks of the* array will start from the root. Use this if you have dropped the* xarray lock and want to reuse the xa_state.
736  xas_lock_irq(xas)
737  如果dax_is_zero_entry(entry)或dax_is_empty_entry(entry)则
740  dax_disassociate_entry(entry, mapping, false)
741  TODO: for reflink+dax we need a way to associate a single page with* multiple address_space instances at different linear_page_index()* offsets.
750  old等于Return: The entry stored at this location before it was locked.
751  WARN_ON_ONCE(old != xa_mk_value() - Create an XArray entry from an integer.*@v: Value to store in XArray.* Context: Any context.* Return: An entry suitable for storing in the XArray.)
753  entry等于new_entry
754  否则
755  xas_load() - Load an entry from the XArray (advanced).*@xas: XArray operation state.* Usually walks the @xas to the appropriate state to load the entry* stored at xa_index. However, it will do nothing and return %NULL if*@xas is in an error state
758  如果dirtyxas_set_mark() - Sets the mark on this entry and its parents.*@xas: XArray operation state.*@mark: Mark number.* Sets the specified mark on this entry, and walks up the tree setting it* on all the ancestor entries
761  xas_unlock_irq(xas)
762  返回:entry
调用者
名称描述
dax_load_holeThe user has performed a load from a hole in the file
dax_iomap_pte_fault