Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Clear a page's dirty flag, while caring for dirty memory accounting.* Returns true if the page was previously dirty.* This is for preparing to put the page under writeout. We leave the page* tagged as dirty in the xarray so that a concurrent write-for-sync

Proto:int clear_page_dirty_for_io(struct page *page)

Type:int

Parameter:

TypeParameterName
struct page *page
2655  mapping = page_mapping(page)
2656  ret = 0
2658  BUG_ON(!PageLocked(page))
2660  If mapping && mapping_cap_account_dirty(mapping) Then
2661  inode = host
2663  struct wb_lock_cookie cookie = {}
2690  If Cleans the PTEs of shared mappings.* (and since clean PTEs should also be readonly, write protects them too)* returns the number of cleaned PTEs. Then Dirty a page
2700  wb = unlocked_inode_to_wb_begin(inode, & cookie)
2701  If TestClearPageDirty(page) Then
2705  ret = 1
2707  unlocked_inode_to_wb_end(inode, & cookie)
2708  Return ret
2710  Return TestClearPageDirty(page)
Caller
NameDescribe
write_cache_pageswrite_cache_pages - walk the list of dirty pages of the given address space and write all of them
write_one_pagewrite_one_page - write out a single page and wait on I/O*@page: the page to write* The page must be locked by the caller and will be unlocked upon return
pageoutpageout is called by shrink_page_list() for each dirty page.* Calls ->writepage().
writeoutWriteback a page to clean the dirty state