函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:sg_zero_buffer - Zero-out a part of a SG list*@sgl: The SG list*@nents: Number of SG entries*@buflen: The number of bytes to zero out*@skip: Number of bytes to skip before zeroing* Returns the number of bytes zeroed.

函数原型:size_t sg_zero_buffer(struct scatterlist *sgl, unsigned int nents, size_t buflen, off_t skip)

返回类型:size_t

参数:

类型参数名称
struct scatterlist *sgl
unsigned intnents
size_tbuflen
off_tskip
958  offset等于0
960  sg_flags等于use kmap_atomic 按位或lush back to phys on unmap
962  开始映射迭代一个SG名单
964  如果非sg_miter_skip - reposition mapping iterator*@miter: sg mapping iter to be skipped*@offset: number of bytes to plus the current location* Description:* Sets the offset of @miter to its current location plus @offset bytes则返回:false
967 offset小于buflensg_miter_next - proceed mapping iterator to the next mapping*@miter: sg mapping iter to proceed* Description:* Proceeds @miter to the next mapping. @miter should have been started* using sg_miter_start(). On successful return, @miter->page,循环
970  len等于两数取小( length of the mapped area , buflen - offset)
971  memset( pointer to the mapped area , 0, len)
973  offset加等于len
976  sg_miter_stop - stop mapping iteration*@miter: sg mapping iter to be stopped* Description:* Stops mapping iterator @miter. @miter should have been started* using sg_miter_start(). A stopped iteration can be resumed by* calling sg_miter_next() on it
977  返回:offset