函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:dax_writeback_one

函数原型:static int dax_writeback_one(struct xa_state *xas, struct dax_device *dax_dev, struct address_space *mapping, void *entry)

返回类型:int

参数:

类型参数名称
struct xa_state *xas
struct dax_device *dax_dev
struct address_space *mapping
void *entry
853  ret等于0
859  如果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.)则返回:负EIO
862  如果此条件成立可能性小(为编译器优化)(dax_is_locked(entry))则
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  如果非entryWARN_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.)则转到:put_unlocked
875  如果dax_to_pfn(old_entry)不等于dax_to_pfn(entry)则转到:put_unlocked
879  ret等于负EIO
880  转到:put_unlocked
884  如果非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.则转到: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  返回:ret
929  put_unlocked :
930  put_unlocked_entry(xas, entry)
931  返回:ret
调用者
名称描述
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.