Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name: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

Proto:int write_one_page(struct page *page)

Type:int

Parameter:

TypeParameterName
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  If 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 Then
2380  get_page(page)
2381  ret = writepage(page, & wbc)
2382  If ret == 0 Then Wait for a page to complete writeback
2384  put_page(page)
2385  Else
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  If Not ret Then ret = filemap_check_errors(mapping)
2391  Return ret