函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

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

返回类型:int

参数:

类型参数名称
struct page *page
2368  mapping等于 See page-flags.h for PAGE_MAPPING_FLAGS
2369  ret等于0
2370  struct writeback_control wbc = {sync_mode = WB_SYNC_ALL, Write this many pages, and decrementthis for each page written = 1, }
2375  BUG_ON(!PageLocked(page))
2377  Wait for a page to complete writeback
2379  如果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
2380  get_page(page)
2381  ret等于writepage(page, & wbc)
2382  如果ret恒等于0则Wait for a page to complete writeback
2384  put_page(page)
2385  否则
2386  lock_page - unlock a locked page*@page: the page* Unlocks the page and wakes up sleepers in ___wait_on_page_locked().* Also wakes sleepers in wait_on_page_writeback() because the wakeup* mechanism between PageLocked pages and PageWriteback pages is shared.
2389  如果非retret等于filemap_check_errors(mapping)
2391  返回:ret