Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dax_lock_mapping_entry - Lock the DAX entry corresponding to a page*@page: The page whose entry we want to lock* Context: Process context.* Return: A cookie to pass to dax_unlock_page() or 0 if the entry could* not be locked.

Proto:dax_entry_t dax_lock_page(struct page *page)

Type:dax_entry_t

Parameter:

TypeParameterName
struct page *page
391  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, NULL, 0)
395  _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
396  cycle
397  mapping = READ_ONCE( See page-flags.h for PAGE_MAPPING_FLAGS )
399  entry = NULL
400  If Not mapping || Not dax_mapping(mapping) Then Break
410  entry = ~0UL
411  If S_ISCHR(i_mode) Then Break
414  xa = i_pages
415  xas_lock_irq( & xas)
417  xas_unlock_irq( & xas)
418  Continue
420  xas_set() - Set up XArray operation state for a different index
421  entry = 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
422  If dax_is_locked(entry) Then
426  Continue
428  Return: The entry stored at this location before it was locked.
429  xas_unlock_irq( & xas)
430  Break
432  _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()
433  Return entry