Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bio.c Create Date:2022-07-28 16:55:13
Last Modify:2020-03-17 23:13:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__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

Proto: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)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
struct bio *bio
struct page *page
unsigned intlen
unsigned intoffset
bool *same_page
742  If Value for the false possibility is greater at compile time(bio_flagged(bio, BIO_CLONED)) Then Return 0
745  If residual I/O count + len >> 9 > queue_max_hw_sectors(q) Then Return 0
748  If how many bio_vec's > 0 Then
749  If bio_try_merge_pc_page(q, bio, page, len, offset, same_page) Then Return len
756  bvec = the actual vec list [ how many bio_vec's - 1]
757  If 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. Then Return 0
761  If _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 Then Return 0
764  If how many bio_vec's >= queue_max_segments(q) Then Return 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  Return len
Caller
NameDescribe
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.