函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\page-writeback.c Create Date:2022-07-27 15:35:09
Last Modify:2022-05-23 13:25:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__test_set_page_writeback

函数原型:int __test_set_page_writeback(struct page *page, bool keep_write)

返回类型:int

参数:

类型参数名称
struct page *page
boolkeep_write
2766  mapping等于page_mapping(page)
2769  lock_page_memcg(page)
2770  如果mappingmapping_use_writeback_tags(mapping)则
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  如果非ret
2797  如果非PageDirty(page)则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  如果非keep_writexas_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  否则
2803  ret等于TestSetPageWriteback(page)
2805  如果非ret
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  返回:ret