Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bio.c Create Date:2022-07-28 16:56:36
Last Modify:2020-03-17 23:13:58 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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

Proto:int bioset_init(struct bio_set *bs, unsigned int pool_size, unsigned int front_pad, int flags)

Type:int

Parameter:

TypeParameterName
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 one * sizeof(structbio_vec)
2002  front_pad = front_pad
2004  Process spin lock initialization( & * 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  If Not bio_slab Then Return -ENOMEM
2012  If mempool_init_slab_pool( & bio_pool, pool_size, bio_slab) Then Go to bad
2015  If flags & BIOSET_NEED_BVECS && reate memory pools for biovec's in a bio_set.* use the global biovec slabs created for general use. Then Go to bad
2019  If Not (flags & BIOSET_NEED_RESCUER) Then Return 0
2022  rescue_workqueue = alloc_workqueue("bioset", WQ_MEM_RECLAIM, 0)
2023  If Not rescue_workqueue Then Go to bad
2026  Return 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  Return -ENOMEM
Caller
NameDescribe
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