函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Find page cache entry at given index. If it is a DAX entry, return it* with the entry locked. If the page cache doesn't contain an entry at* that index, add a locked empty entry.* When requesting an entry with size DAX_PMD, grab_mapping_entry() will

函数原型:static void *grab_mapping_entry(struct xa_state *xas, struct address_space *mapping, unsigned int order)

返回类型:void

参数:

类型参数名称
struct xa_state *xas
struct address_space *mapping
unsigned intorder
479  index等于xa_index
480  bool pmd_downgrade = false
483  retry :
484  xas_lock_irq(xas)
485  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
487  如果entry
488  如果rue if the entry that was found is of a smaller order than the entry* we were looking for则转到:fallback
492  转到:out_unlock
495  如果order恒等于0则
499  pmd_downgrade = true
504  如果pmd_downgrade
509  Return: The entry stored at this location before it was locked.
516  如果dax_is_zero_entry(entry)则
522  xas_lock_irq(xas)
525  dax_disassociate_entry(entry, mapping, false)
526  xas_store() - Store this entry in the XArray
527  @entry may no longer be the entry at the index in the mapping.* The important information it's conveying is whether the entry at* this index used to be a PMD entry.
528  nrexceptional自减
529  entry = NULL
530  xas_set() - Set up XArray operation state for a different index
533  如果entry
534  Return: The entry stored at this location before it was locked.
535  否则
536  flags等于DAX_EMPTY
538  如果order大于0则flags或等于DAX_PMD
540  entry等于dax_make_entry(a default pfn to pfn_t conversion assumes that @pfn is pfn_valid() , flags)
541  Return: The entry stored at this location before it was locked.
542  如果xas_error() - Return an errno stored in the xa_state.*@xas: XArray operation state.* Return: 0 if no error has been noted. A negative errno if one has.则转到:out_unlock
544  nrexceptional自加
547  out_unlock :
548  xas_unlock_irq(xas)
549  如果xas_nomem() - Allocate memory if needed.*@xas: XArray operation state.*@gfp: Memory allocation flags.* If we need to add new nodes to the XArray, we try to allocate memory* with GFP_NOWAIT while holding the lock, which will usually succeed.则转到:retry
551  如果xa_node恒等于We encode errnos in the xas->xa_node. If an error has happened, we need to* drop the lock to fix it, and once we've done so the xa_state is invalid.( - ENOMEM)则返回:xa_mk_internal() - Create an internal entry.*@v: Value to turn into an internal entry.* Internal entries are used for a number of purposes. Entries 0-255 are* used for sibling entries (only 0-62 are used by the current code). 256
553  如果xas_error() - Return an errno stored in the xa_state.*@xas: XArray operation state.* Return: 0 if no error has been noted. A negative errno if one has.则返回:xa_mk_internal() - Create an internal entry.*@v: Value to turn into an internal entry.* Internal entries are used for a number of purposes. Entries 0-255 are* used for sibling entries (only 0-62 are used by the current code). 256
555  返回:entry
556  fallback :
557  xas_unlock_irq(xas)
558  返回:xa_mk_internal() - Create an internal entry.*@v: Value to turn into an internal entry.* Internal entries are used for a number of purposes. Entries 0-255 are* used for sibling entries (only 0-62 are used by the current code). 256
调用者
名称描述
dax_iomap_pte_fault