函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dax_insert_pfn_mkwrite - insert PTE or PMD entry into page tables*@vmf: The description of the fault*@pfn: PFN to insert*@order: Order of entry to insert.* This function inserts a writeable PTE or PMD entry into the page tables* for an mmaped DAX file

函数原型:static vm_fault_t dax_insert_pfn_mkwrite(struct vm_fault *vmf, pfn_t pfn, unsigned int order)

返回类型:vm_fault_t

参数:

类型参数名称
struct vm_fault *vmf
pfn_tpfn
unsigned intorder
1675  mapping等于f_mapping
1676  XA_STATE_ORDER() - Declare an XArray operation state.*@name: Name of this operation state (usually xas).*@array: Array to operate on.*@index: Initial index of interest.*@order: Order of entry.* Declare and initialise an xa_state on the stack(xas, & i_pages, pgoff, order)
1680  xas_lock_irq( & xas)
1681  entry等于Look up entry in page cache, wait for it to become unlocked if it* is a DAX entry and return it. The caller must subsequently call* put_unlocked_entry() if it did not lock the entry or dax_unlock_entry()* if it did
1683  如果非entryrue if the entry that was found is of a smaller order than the entry* we were looking fororder恒等于0且非dax_is_pte_entry(entry)则
1685  put_unlocked_entry( & xas, entry)
1686  xas_unlock_irq( & xas)
1687  trace_dax_insert_pfn_mkwrite_no_entry(host, vmf, VM_FAULT_NOPAGE)
1689  返回:VM_FAULT_NOPAGE
1691  xas_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
1692  Return: The entry stored at this location before it was locked.
1693  xas_unlock_irq( & xas)
1694  如果order恒等于0则ret等于If the insertion of PTE failed because someone else already added a* different entry in the mean time, we treat that as success as we assume* the same entry was actually inserted.
1700  否则ret等于VM_FAULT_FALLBACK
1702  We used the xa_state to get the entry, but then we locked the entry and* dropped the xa_lock, so we know the xa_state is stale and must be reset* before use.
1703  trace_dax_insert_pfn_mkwrite(host, vmf, ret)
1704  返回:ret
调用者
名称描述
dax_finish_sync_faultdax_finish_sync_fault - finish synchronous page fault*@vmf: The description of the fault*@pe_size: Size of entry to be inserted*@pfn: PFN to insert* This function ensures that the file range touched by the page fault is* stored persistently on the media