Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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.

Proto:int dax_writeback_mapping_range(struct address_space *mapping, struct block_device *bdev, struct writeback_control *wbc)

Type:int

Parameter:

TypeParameterName
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  If WARN_ON_ONCE(i_blkbits != PAGE_SHIFT determines the page size ) Then Return -EIO
953  If Not nrexceptional || sync_mode != Wait on every mapping Then Return 0
956  dax_dev = dax_get_by_host(disk_name)
957  If Not dax_dev Then Return -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  If ret < 0 Then
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  Break
971  If ++scanned % XA_CHECK_SCHED Then Continue
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  Return ret