Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-core.c Create Date:2022-07-28 17:00:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

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

Proto: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)

Type:int

Parameter:

TypeParameterName
struct request *rq
struct request *rq_src
struct bio_set *bs
gfp_tgfp_mask
int (*bio_ctr
void *data
1629  If Not bs Then bs = 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  If Not bio Then Go to free_and_out
1637  If bio_ctr && bio_ctr(bio, bio_src, data) Then Go to free_and_out
1640  If bio Then
1641  request queue link = bio
1642  biotail = bio
1643  Else 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  Return 0
1651  free_and_out :
1652  If bio Then _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  Return -ENOMEM