函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:set_init - Initialize a bio_set*@bs: pool to initialize*@pool_size: Number of bio and bio_vecs to cache in the mempool*@front_pad: Number of bytes to allocate in front of the returned bio*@flags: Flags to modify behavior, currently %BIOSET_NEED_BVECS* and

函数原型:int bioset_init(struct bio_set *bs, unsigned int pool_size, unsigned int front_pad, int flags)

返回类型:int

参数:

类型参数名称
struct bio_set *bs
unsigned intpool_size
unsigned intfront_pad
intflags
2000  back_pad等于Test patch to inline a certain number of bi_io_vec's inside the bio* itself, to shrink a bio data allocation from two mempool calls to onesizeof(structbio_vec)
2002  front_pad等于front_pad
2004  spin_lock_init( & * Deadlock avoidance for stacking block drivers: see comments in * bio_alloc_bioset() for details)
2005  bio_list_init( & rescue_list)
2006  INIT_WORK( & rescue_work, bio_alloc_rescue)
2008  bio_slab等于bio_find_or_create_slab(front_pad + back_pad)
2009  如果非bio_slab则返回:负ENOMEM
2012  如果mempool_init_slab_pool( & bio_pool, pool_size, bio_slab)则转到:bad
2015  如果flags按位与BIOSET_NEED_BVECSreate memory pools for biovec's in a bio_set.* use the global biovec slabs created for general use.则转到:bad
2019  如果非flags按位与BIOSET_NEED_RESCUER的值则返回:0
2022  rescue_workqueue等于alloc_workqueue("bioset", WQ_MEM_RECLAIM, 0)
2023  如果非rescue_workqueue则转到:bad
2026  返回:0
2027  bad :
2028  set_exit - exit a bioset initialized with bioset_init()* May be called on a zeroed but uninitialized bioset (i.e. allocated with* kzalloc()).
2029  返回:负ENOMEM
调用者
名称描述
bioset_init_from_srcInitialize and setup a new bio_set, based on the settings from* another bio_set.
init_bio
blk_alloc_queue_nodelk_alloc_queue_node - allocate a request queue*@gfp_mask: memory allocation flags*@node_id: NUMA node to allocate memory from
init_bounce_bioset
iomap_init