函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:__bio_add_pc_page - attempt to add page to passthrough bio*@q: the target queue*@bio: destination bio*@page: page to add*@len: vec entry length*@offset: vec entry offset*@same_page: return if the merge happen inside the same page

函数原型:static int __bio_add_pc_page(struct request_queue *q, struct bio *bio, struct page *page, unsigned int len, unsigned int offset, bool *same_page)

返回类型:int

参数:

类型参数名称
struct request_queue *q
struct bio *bio
struct page *page
unsigned intlen
unsigned intoffset
bool *same_page
742  如果此条件成立可能性小(为编译器优化)(bio_flagged(bio, BIO_CLONED))则返回:0
745  如果 residual I/O count len右移9位大于queue_max_hw_sectors(q)则返回:0
748  如果 how many bio_vec's 大于0则
749  如果bio_try_merge_pc_page(q, bio, page, len, offset, same_page)则返回:len
756  bvec等于 the actual vec list [ how many bio_vec's - 1]
757  如果Check if adding a bio_vec after bprv with offset would create a gap in* the SG list. Most drivers don't care about this, but some do.则返回:0
761  如果_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
764  如果 how many bio_vec's 大于等于queue_max_segments(q)则返回:0
767  bvec等于 the actual vec list [ how many bio_vec's ]
768  bv_page等于page
769  bv_len等于len
770  bv_offset等于offset
771  how many bio_vec's 自加
772  residual I/O count 加等于len
773  返回:len
调用者
名称描述
bio_add_pc_page
bio_map_user_iov_map_user_iov - map user iovec into bio*@q: the struct request_queue for the bio*@iter: iovec iterator*@gfp_mask: memory allocation flags* Map the user space address into a bio suitable for io to a block* device. Returns an error pointer in case of error.