Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:__blk_bios_map_sg

Proto:static int __blk_bios_map_sg(struct request_queue *q, struct bio *bio, struct scatterlist *sglist, struct scatterlist **sg)

Type:int

Parameter:

TypeParameterName
struct request_queue *q
struct bio *bio
struct scatterlist *sglist
struct scatterlist **sg
486  struct bio_vec bvec = bvec, bvprv = {NULL}
488  nsegs = 0
489  bool new_bio = false
492  rate over multi-page bvec (bvec, bio, iter)
498  If new_bio && ly try to merge bvecs into one sg if they are from two bios Then Go to next_bvec
502  If bv_offset + bv_len <= PAGE_SIZE Then nsegs += __blk_bvec_map_sg(bvec, sglist, sg)
504  Else nsegs += blk_bvec_map_sg(q, & bvec, sglist, sg)
506  next_bvec :
507  new_bio = false
509  If Value is more likely to compile time( residual I/O count ) Then
510  bvprv = bvec
511  new_bio = true
515  Return nsegs
Caller
NameDescribe
blk_rq_map_sgmap a request to scatterlist, return number of sg entries setup. Caller* must make sure sg can hold rq->nr_phys_segments entries