Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lk_bio_segment_split - split a bio in two bios*@q: [in] request queue pointer*@bio: [in] bio to be split*@bs: [in] bio set to allocate the clone from*@segs: [out] number of segments in the bio with the first half of the sectors* Clone @bio, update the

Proto:static struct bio *blk_bio_segment_split(struct request_queue *q, struct bio *bio, struct bio_set *bs, unsigned *segs)

Type:struct bio

Parameter:

TypeParameterName
struct request_queue *q
struct bio *bio
struct bio_set *bs
unsigned *segs
249  struct bio_vec bv, bvprv, * bvprvp = NULL
251  nsegs = 0 , sectors = 0
252  max_sectors = Return the maximum number of sectors from the start of a bio that may be* submitted as a single request to a block device. If enough sectors remain,* align the end to the physical block size. Otherwise align the end to the* logical block size
253  max_segs = queue_max_segments(q)
255  rate over multi-page bvec (bv, bio, iter)
260  If bvprvp && Check if adding a bio_vec after bprv with offset would create a gap in* the SG list. Most drivers don't care about this, but some do. Then Go to split
263  If nsegs < max_segs && sectors + (bv_len >> 9) <= max_sectors && bv_offset + bv_len <= PAGE_SIZE Then
266  nsegs++
267  sectors += bv_len >> 9
270  Go to split
273  bvprv = bv
274  bvprvp = bvprv
277  segs = nsegs
278  Return NULL
279  split :
280  segs = nsegs
281  Return _split - split a bio*@bio: bio to split*@sectors: number of sectors to split from the front of @bio*@gfp: gfp mask*@bs: bio set to allocate from* Allocates and returns a new bio which represents @sectors from the start of
Caller
NameDescribe
__blk_queue_split__blk_queue_split - split a bio and submit the second half*@q: [in] request queue pointer*@bio: [in, out] bio to be split*@nr_segs: [out] number of segments in the first bio* Split a bio into two bios, chain the two bios, submit the second half and