函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-merge.c Create Date:2022-07-27 18:41:11
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blk_bvec_map_sg

函数原型:static unsigned blk_bvec_map_sg(struct request_queue *q, struct bio_vec *bvec, struct scatterlist *sglist, struct scatterlist **sg)

返回类型:unsigned

参数:

类型参数名称
struct request_queue *q
struct bio_vec *bvec
struct scatterlist *sglist
struct scatterlist **sg
421  nbytes等于bv_len
422  nsegs等于0, total等于0
424 nbytes大于0循环
425  offset等于bv_offsettotal
426  len等于两数取小(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  返回:nsegs
调用者
名称描述
__blk_bios_map_sg