函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lock_write_begin takes care of the basic task of block allocation and* bringing partial write blocks uptodate first.* The filesystem needs to handle block truncation upon failure.

函数原型:int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len, unsigned flags, struct page **pagep, get_block_t *get_block)

返回类型:int

参数:

类型参数名称
struct address_space *mapping
loff_tpos
unsignedlen
unsignedflags
struct page **pagep
get_block_t *get_block
2109  index等于pos右移PAGE_SHIFT determines the page size
2113  page等于Find or create a page at the given pagecache position. Return the locked* page. This function is specifically for buffered writes.
2114  如果非page则返回:负ENOMEM
2117  status等于__block_write_begin(page, pos, len, get_block)
2118  如果此条件成立可能性小(为编译器优化)(status)则
2119  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.
2120  Perform a free_page(), also freeing any swap cache associated with* this page if it is the last user of the page.
2121  page = NULL
2124  pagep等于page
2125  返回:status
调用者
名称描述
cont_write_beginFor moronic filesystems that do not allow holes in file.* We may have to extend the file.
blkdev_write_begin