函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lk_rq_prep_clone - Helper function to setup clone request*@rq: the request to be setup*@rq_src: original request to be cloned*@bs: bio_set that bios for clone are allocated from*@gfp_mask: memory allocation mask for bio

函数原型:int blk_rq_prep_clone(struct request *rq, struct request *rq_src, struct bio_set *bs, gfp_t gfp_mask, int (*bio_ctr)(struct bio *, struct bio *, void *), void *data)

返回类型:int

参数:

类型参数名称
struct request *rq
struct request *rq_src
struct bio_set *bs
gfp_tgfp_mask
int (*bio_ctr
void *data
1629  如果非bsbs等于s_bio_set is the bio_set containing bio and iovec memory pools used by* IO code that does not need private memory pools.
1633  bio等于_clone_fast - clone a bio that shares the original bio's biovec*@bio: bio to clone*@gfp_mask: allocation priority*@bs: bio_set to allocate from* Like __bio_clone_fast, only also allocates the returned bio
1634  如果非bio则转到:free_and_out
1637  如果bio_ctrbio_ctr(bio, bio_src, data)则转到:free_and_out
1640  如果bio
1641  request queue link 等于bio
1642  biotail等于bio
1643  否则bio等于biotail等于bio
1647  Copy attributes of the original request to the clone request.* The actual data parts (e.g. ->cmd, ->sense) are not copied.
1649  返回:0
1651  free_and_out :
1652  如果bio_put - release a reference to a bio*@bio: bio to release reference to* Description:* Put a reference to a &struct bio, either one you have gotten with* bio_alloc, bio_get or bio_clone_*. The last put of a bio will free it.
1654  lk_rq_unprep_clone - Helper function to free all bios in a cloned request*@rq: the clone request to be cleaned up* Description:* Free all bios in @rq for a cloned request.
1656  返回:负ENOMEM