Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-merge.c Create Date:2022-07-28 17:05:53
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:blk_bvec_map_sg

Proto:static unsigned blk_bvec_map_sg(struct request_queue *q, struct bio_vec *bvec, struct scatterlist *sglist, struct scatterlist **sg)

Type:unsigned

Parameter:

TypeParameterName
struct request_queue *q
struct bio_vec *bvec
struct scatterlist *sglist
struct scatterlist **sg
421  nbytes = bv_len
422  nsegs = 0 , total = 0
424  When nbytes > 0 cycle
425  offset = bv_offset + total
426  len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(get_max_segment_size(q, bv_page, offset), nbytes)
428  page = bv_page
438  page += offset >> PAGE_SHIFT determines the page size
439  offset &= ~PAGE_MASK
441  sg = blk_next_sg(sg, sglist)
442  sg_set_page - Set sg entry to point at given page*@sg: SG entry*@page: The page*@len: Length of data*@offset: Offset into page* Description:* Use this function to set an sg entry pointing at a page, never assign* the page directly
444  total += len
445  nbytes -= len
446  nsegs++
449  Return nsegs
Caller
NameDescribe
__blk_bios_map_sg