函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Flush 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.

函数原型:int dax_writeback_mapping_range(struct address_space *mapping, struct block_device *bdev, struct writeback_control *wbc)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
struct block_device *bdev
struct writeback_control *wbc
942  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, & i_pages, For a_ops->writepages(): if start or end are non-zero then this is* a hint that the filesystem need only write out the pages inside that* byterange. The byte at `end' is included in the writeout request. >> PAGE_SHIFT determines the page size )
943  inode等于host
944  end_index等于range_end右移PAGE_SHIFT determines the page size
947  ret等于0
948  scanned等于0
950  如果WARN_ON_ONCE(i_blkbits != PAGE_SHIFT determines the page size )则返回:负EIO
953  如果非nrexceptionalsync_mode不等于Wait on every mapping 则返回:0
956  dax_dev等于dax_get_by_host(disk_name)
957  如果非dax_dev则返回:负EIO
960  trace_dax_writeback_range(inode, xa_index, end_index)
962  ag_pages_for_writeback - tag pages to be written by write_cache_pages*@mapping: address space structure to write*@start: starting page index*@end: ending page index (inclusive)* This function scans the page range from @start to @end (inclusive) and tags
964  xas_lock_irq( & xas)
966  ret等于dax_writeback_one( & xas, dax_dev, mapping, entry)
967  如果ret小于0则
968  mapping_set_error - record a writeback error in the address_space*@mapping - the mapping in which an error should be set*@error - the error to set in the mapping* When writeback fails in some way, we must record that error so that
969  退出
971  如果scanned先自加取模XA_CHECK_SCHED则继续下一循环
974  xas_pause() - Pause a walk to drop a lock.*@xas: XArray operation state.* Some users need to pause a walk and drop the lock they're holding in* order to yield to a higher priority thread or carry out an operation* on an entry
975  xas_unlock_irq( & xas)
976  cond_resched()
977  xas_lock_irq( & xas)
979  xas_unlock_irq( & xas)
980  put_dax(dax_dev)
981  trace_dax_writeback_range_done(inode, xa_index, end_index)
982  返回:ret