函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bio.c Create Date:2022-07-27 18:30:33
Last Modify:2020-03-17 23:13:58 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:_add_page - attempt to add page(s) to bio*@bio: destination bio*@page: start page to add*@len: vec entry length, may cross pages*@offset: vec entry offset relative to @page, may cross pages* Attempt to add page(s) to the bio_vec maplist

函数原型:int bio_add_page(struct bio *bio, struct page *page, unsigned int len, unsigned int offset)

返回类型:int

参数:

类型参数名称
struct bio *bio
struct page *page
unsigned intlen
unsigned intoffset
864  bool same_page = false
866  如果非__bio_try_merge_page - try appending data to an existing bvec.*@bio: destination bio*@page: start page to add*@len: length of the data to add*@off: offset of the data relative to @page*@same_page: return if the segment has been merged inside the same page
867  如果_full - check if the bio is full*@bio: bio to check*@len: length of one segment to be added* Return true if @bio is full and one segment with @len bytes can't be* added to the bio, otherwise return false则返回:0
869  __bio_add_page - add page(s) to a bio in a new segment*@bio: destination bio*@page: start page to add*@len: length of the data to add, may cross pages*@off: offset of the data relative to @page, may cross pages
871  返回:len
调用者
名称描述
__bio_iov_bvec_add_pages
__blkdev_issue_zero_pages
dio_bio_add_pageAttempt to put the current chunk of 'cur_page' into the current BIO. If* that was successful then update final_block_in_bio and take a ref against* the just-added page.* Return zero on success. Non-zero means the caller needs to start a new BIO.
do_mpage_readpageThis is the worker routine which does all the work of mapping the disk* blocks and constructs largest possible bios, submits them for IO if the* blocks are not contiguous on the disk
__mpage_writepage
fscrypt_zeroout_range
iomap_readpage_actor
iomap_add_to_ioendTest to see if we have an existing ioend structure that we could append to* first, otherwise finish off the current ioend and start another.
hib_submit_io