Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\iomap\buffered-io.c Create Date:2022-07-28 20:31:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Write out a dirty page.* For delalloc space on the page we need to allocate space and flush it.* For unwritten space on the page we need to start the conversion to* regular allocated space.

Proto:static int iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)

Type:int

Parameter:

TypeParameterName
struct page *page
struct writeback_control *wbc
void *data
1524  wpc = data
1525  inode = host
1530  trace_iomap_writepage(inode, page, 0, 0)
1542  If WARN_ON_ONCE((flags & (Allocating memory | I am kswapd )) == Allocating memory ) Then Go to redirty
1550  If WARN_ON_ONCE(flags & All allocation requests will inherit GFP_NOFS ) Then Go to redirty
1566  offset = NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
1567  end_index = offset >> PAGE_SHIFT determines the page size
1568  If Our offset within mapping. < end_index Then end_offset = Our offset within mapping. + 1 << PAGE_SHIFT determines the page size
1570  Else
1582  offset_into_page = offset & PAGE_SIZE - 1
1601  If Our offset within mapping. > end_index || Our offset within mapping. == end_index && offset_into_page == 0 Then Go to redirty
1613  zero_user_segment(page, offset_into_page, PAGE_SIZE)
1616  end_offset = offset
1619  Return We 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
1621  redirty :
1622  When a writepage implementation decides that it doesn't want to write this* page for some reason, it should redirty the locked page via* redirty_page_for_writepage() and it should then unlock the page and return 0
1623  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.
1624  Return 0
Caller
NameDescribe
iomap_writepage