函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:int clear_page_dirty_for_io(struct page *page)

返回类型:int

参数:

类型参数名称
struct page *page
2655  mapping等于page_mapping(page)
2656  ret等于0
2658  BUG_ON(!PageLocked(page))
2660  如果mappingmapping_cap_account_dirty(mapping)则
2661  inode等于host
2663  struct wb_lock_cookie cookie = {}
2690  如果Cleans the PTEs of shared mappings.* (and since clean PTEs should also be readonly, write protects them too)* returns the number of cleaned PTEs.Dirty a page
2700  wb等于unlocked_inode_to_wb_begin(inode, & cookie)
2701  如果TestClearPageDirty(page)则
2705  ret等于1
2707  unlocked_inode_to_wb_end(inode, & cookie)
2708  返回:ret
2710  返回:TestClearPageDirty(page)
调用者
名称描述
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
iomap_writepage_mapWe implement an immediate ioend submission policy here to avoid needing to* chain multiple ioends and hence nest mempool allocations which can violate* forward progress guarantees we need to provide