Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page-writeback.c Create Date:2022-07-28 14:11:30
Last Modify:2022-05-23 13:25:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__test_set_page_writeback

Proto:int __test_set_page_writeback(struct page *page, bool keep_write)

Type:int

Parameter:

TypeParameterName
struct page *page
boolkeep_write
2766  mapping = page_mapping(page)
2769  lock_page_memcg(page)
2770  If mapping && mapping_use_writeback_tags(mapping) Then
2771  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, Return the pagecache index of the passed page. Regular pagecache pages* use ->index whereas swapcache pages use swp_offset(->private))
2772  inode = host
2773  bdi = inode_to_bdi(inode)
2776  xas_lock_irqsave( & xas, flags)
2777  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
2778  ret = TestSetPageWriteback(page)
2779  If Not ret Then
2797  If Not PageDirty(page) Then 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
2799  If Not keep_write Then 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
2801  xas_unlock_irqrestore( & xas, flags)
2802  Else
2803  ret = TestSetPageWriteback(page)
2805  If Not ret Then
2806  inc_lruvec_page_state(page, NR_WRITEBACK)
2807  We only use atomic operations to update counters. So there is no need to* disable interrupts.(page, NR_ZONE_WRITE_PENDING)
2809  unlock_page_memcg(page)
2810  Return ret