函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bvec_alloc

函数原型:struct bio_vec *bvec_alloc(gfp_t gfp_mask, int nr, unsigned long *idx, mempool_t *pool)

返回类型:struct bio_vec

参数:

类型参数名称
gfp_tgfp_mask
intnr
unsigned long *idx
mempool_t *pool
178  :nr恒等于1
179  idx等于0
180  退出
181  :nr == 2...4
182  idx等于1
183  退出
184  :nr == 5...16
185  idx等于2
186  退出
187  :nr == 17...64
188  idx等于3
189  退出
190  :nr == 65...128
191  idx等于4
192  退出
193  :nr == 129...BIO_MAX_PAGES
194  idx等于5
195  退出
196  默认
197  返回:NULL
204  如果idx恒等于BVEC_POOL_MAX
205  fallback :
206  bvl等于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
207  否则
208  bvs等于bvec_slabsidx
209  __gfp_mask等于gfp_mask按位与Caller can reclaim 按位或DOC: Reclaim modifiers* Reclaim modifiers* ~~~~~~~~~~~~~~~~~* %__GFP_IO can start physical IO.* %__GFP_FS can call down to the low-level FS. Clearing the flag avoids the* allocator recursing into the filesystem which might already be holding* locks.的值的反
216  __gfp_mask或等于__GFP_NOMEMALLOC按位或__GFP_NORETRY按位或DOC: Action modifiers* Action modifiers* ~~~~~~~~~~~~~~~~* %__GFP_NOWARN suppresses allocation failure reports.* %__GFP_COMP address compound page metadata.* %__GFP_ZERO returns a zeroed page on success.
222  bvl等于分配高速缓存区
224  idx等于BVEC_POOL_MAX
225  转到:fallback
229  idx自加
230  返回:bvl
调用者
名称描述
bio_alloc_bioset_alloc_bioset - allocate a bio for I/O*@gfp_mask: the GFP_* mask given to the slab allocator*@nr_iovecs: number of iovecs to pre-allocate*@bs: the bio_set to allocate from
bio_integrity_alloc_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