函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:_integrity_alloc - Allocate integrity payload and attach it to bio*@bio: bio to attach integrity metadata to*@gfp_mask: Memory allocation mask*@nr_vecs: Number of integrity metadata scatter-gather elements* Description: This function prepares a bio for

函数原型:struct bio_integrity_payload *bio_integrity_alloc(struct bio *bio, gfp_t gfp_mask, unsigned int nr_vecs)

返回类型:struct bio_integrity_payload

参数:

类型参数名称
struct bio *bio
gfp_tgfp_mask
unsigned intnr_vecs
42  bs等于bi_pool
45  如果非bs或非mempool_initialized( & bio_integrity_pool)则
46  bip等于开辟内存
47  inline_vecs等于nr_vecs
48  否则
49  bip等于mempool_alloc - allocate an element from a specific memory pool*@pool: pointer to the memory pool which was allocated via* mempool_create().*@gfp_mask: the usual allocation bitmask.* this function only sleeps if the alloc_fn() function sleeps or
50  inline_vecs等于BIP_INLINE_VECS
53  如果此条件成立可能性小(为编译器优化)(!bip)则返回:错误号
56  memset(bip, 0, bip的长度)
58  如果nr_vecs大于inline_vecs
59  idx等于0
61  bip_vec等于bvec_alloc(gfp_mask, nr_vecs, & idx, & bvec_integrity_pool)
63  如果非bip_vec则转到:err
65  grity bio_vec slots 等于bvec_nr_vecs(idx)
66  slab the bip came from 等于idx
67  否则
68  bip_vec等于mbedded bvec array
69  grity bio_vec slots 等于inline_vecs
72  parent bio 等于bio
73  data integrity 等于bip
74  bottom bits req flags, * top bits REQ_OP. Use * accessors.或等于REQ_INTEGRITY
76  返回:bip
77  err :
78  mempool_free - return an element to the pool.*@element: pool element pointer.*@pool: pointer to the memory pool which was allocated via* mempool_create().* this function only sleeps if the free_fn() function sleeps.
79  返回:错误号
调用者
名称描述
bio_integrity_prep_integrity_prep - Prepare bio for integrity I/O*@bio: bio to prepare* Description: Checks if the bio already has an integrity payload attached.* If it does, the payload has been generated by another kernel subsystem,* and we just pass it through
bio_integrity_clone_integrity_clone - Callback for cloning bios with integrity metadata*@bio: New bio*@bio_src: Original bio*@gfp_mask: Memory allocation mask* Description: Called to allocate a bip when cloning a bio