函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:_truncate - truncate the bio to small size of @new_size*@bio: the bio to be truncated*@new_size: new size for truncating the bio* Description:* Truncate the bio to new size of @new_size. If bio_op(bio) is* REQ_OP_READ, zero the truncated part

函数原型:void bio_truncate(struct bio *bio, unsigned new_size)

返回类型:void

参数:

类型参数名称
struct bio *bio
unsignednew_size
555  done等于0
556  bool truncated = false
558  如果new_size大于等于 residual I/O count 则返回
561  如果bio_op(bio)不等于REQ_OP_READ则转到:exit
564  bio_for_each_segment(bv, bio, iter)
565  如果donebv_len大于new_size
568  如果非truncatedoffset等于new_sizedone
570  否则offset等于0
573  truncated = true
575  done加等于bv_len
578  exit :
587  residual I/O count 等于new_size