函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\iomap\buffered-io.c Create Date:2022-07-29 11:07:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

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

函数原型:static int iomap_do_writepage(struct page *page, struct writeback_control *wbc, void *data)

返回类型:int

参数:

类型参数名称
struct page *page
struct writeback_control *wbc
void *data
1524  wpc等于data
1525  inode等于host
1530  trace_iomap_writepage(inode, page, 0, 0)
1542  如果WARN_ON_ONCE((flags & (Allocating memory | I am kswapd )) == Allocating memory )则转到:redirty
1550  如果WARN_ON_ONCE(flags & All allocation requests will inherit GFP_NOFS )则转到: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  如果 Our offset within mapping. 小于end_indexend_offset等于 Our offset within mapping. 加1左移PAGE_SHIFT determines the page size
1570  否则
1582  offset_into_page等于offset按位与PAGE_SIZE减1
1601  如果 Our offset within mapping. 大于end_index Our offset within mapping. 恒等于end_indexoffset_into_page恒等于0则转到:redirty
1613  zero_user_segment(page, offset_into_page, PAGE_SIZE)
1616  end_offset等于offset
1619  返回: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  返回:0
调用者
名称描述
iomap_writepage