Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:dax_writeback_one

Proto:static int dax_writeback_one(struct xa_state *xas, struct dax_device *dax_dev, struct address_space *mapping, void *entry)

Type:int

Parameter:

TypeParameterName
struct xa_state *xas
struct dax_device *dax_dev
struct address_space *mapping
void *entry
853  ret = 0
859  If WARN_ON(!xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.) Then Return -EIO
862  If Value for the false possibility is greater at compile time(dax_is_locked(entry)) Then
863  old_entry = entry
865  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
868  If Not entry || WARN_ON_ONCE(!xa_is_value() - Determine if an entry is a value.*@entry: XArray entry.* Context: Any context.* Return: True if the entry is a value, false if it is a pointer.) Then Go to put_unlocked
875  If dax_to_pfn(old_entry) != dax_to_pfn(entry) Then Go to put_unlocked
879  ret = -EIO
880  Go to put_unlocked
884  If Not xas_get_mark() - Returns the state of this mark.*@xas: XArray operation state.*@mark: Mark number.* Return: true if the mark is set, false if the mark is clear or @xas* is in an error state. Then Go to put_unlocked
889  Return: The entry stored at this location before it was locked.
898  xas_clear_mark() - Clears the mark on this entry and its parents.*@xas: XArray operation state.*@mark: Mark number.* Clears the specified mark on this entry, and walks back to the head* attempting to clear it on all the ancestor entries. Does nothing if
899  xas_unlock_irq(xas)
908  pfn = dax_to_pfn(entry)
909  count = 1UL << dax_entry_order(entry)
910  index = xa_index & ~(count - 1)
912  Walk all mappings of a given index of a file and writeprotect them
913  dax_flush(dax_dev, page_address(pfn_to_page(pfn)), count * PAGE_SIZE)
920  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.
921  xas_lock_irq(xas)
922  xas_store() - Store this entry in the XArray
923  xas_clear_mark() - Clears the mark on this entry and its parents.*@xas: XArray operation state.*@mark: Mark number.* Clears the specified mark on this entry, and walks back to the head* attempting to clear it on all the ancestor entries. Does nothing if
924  @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.
926  trace_dax_writeback_one(host, index, count)
927  Return ret
929  put_unlocked :
930  put_unlocked_entry(xas, entry)
931  Return ret
Caller
NameDescribe
dax_writeback_mapping_rangeFlush the mapping to the persistent domain within the byte range of [start,* end]. This is required by data integrity operations to ensure file data is* on persistent storage prior to completion of the operation.