函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\buffer.c Create Date:2022-07-29 10:45:22
Last Modify:2020-03-18 10:38:29 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:bh_writepage() - based on block_full_write_page() except* that it tries to operate without attaching bufferheads to* the page.

函数原型:int nobh_writepage(struct page *page, get_block_t *get_block, struct writeback_control *wbc)

返回类型:int

参数:

类型参数名称
struct page *page
get_block_t *get_block
struct writeback_control *wbc
2758  inode等于host
2759  i_size等于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
2760  end_index等于i_size右移PAGE_SHIFT determines the page size
2765  如果 Our offset within mapping. 小于end_index则转到:out
2769  offset等于i_size按位与PAGE_SIZE减1
2770  如果 Our offset within mapping. 大于等于end_index加1或非offset
2781  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.
2782  返回:0
2792  zero_user_segment(page, offset, PAGE_SIZE)
2793  out :
2794  ret等于mpage_writepage(page, get_block, wbc)
2795  如果ret恒等于负EAGAINret等于While block_write_full_page is writing back the dirty buffers under* the page lock, whoever dirtied the buffers may decide to clean them* again at any time
2798  返回:ret