Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

Proto:static vm_fault_t dax_insert_pfn_mkwrite(struct vm_fault *vmf, pfn_t pfn, unsigned int order)

Type:vm_fault_t

Parameter:

TypeParameterName
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  If Not entry || rue if the entry that was found is of a smaller order than the entry* we were looking for || order == 0 && Not dax_is_pte_entry(entry) Then
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  Return 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  If order == 0 Then 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  Else 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  Return ret
Caller
NameDescribe
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