Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:vec_split_segs - verify whether or not a bvec should be split in the middle*@q: [in] request queue associated with the bio associated with @bv*@bv: [in] bvec to examine*@nsegs: [in,out] Number of segments in the bio being built

Proto:static bool bvec_split_segs(const struct request_queue *q, const struct bio_vec *bv, unsigned *nsegs, unsigned *sectors, unsigned max_segs, unsigned max_sectors)

Type:bool

Parameter:

TypeParameterName
const struct request_queue *q
const struct bio_vec *bv
unsigned *nsegs
unsigned *sectors
unsignedmax_segs
unsignedmax_sectors
201  max_len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(max_sectors, UINT_MAX >> 9) - sectors << 9
202  len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(bv_len, max_len)
203  total_len = 0
204  seg_size = 0
206  When len && nsegs < max_segs cycle
207  seg_size = get_max_segment_size(q, bv_page, bv_offset + total_len)
209  seg_size = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(seg_size, len)
211  nsegs++
212  total_len += seg_size
213  len -= seg_size
215  If bv_offset + total_len & queue_virt_boundary(q) Then Break
219  sectors += total_len >> 9
222  Return len > 0 || bv_len > max_len
Caller
NameDescribe
blk_bio_segment_splitlk_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
blk_recalc_rq_segments