Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_try_merge

Proto:enum elv_merge blk_try_merge(struct request *rq, struct bio *bio)

Type:enum elv_merge

Parameter:

TypeParameterName
struct request *rq
struct bio *bio
908  If Two cases of handling DISCARD merge:* If max_discard_segments > 1, the driver takes every bio* as a range and send them to controller together. The ranges* needn't to be contiguous.* Otherwise, the bios/requests will be handled as same as Then Return ELEVATOR_DISCARD_MERGE
910  Else if lk_rq_pos() : the current sector* blk_rq_bytes() : bytes left in the entire request* blk_rq_cur_bytes() : bytes left in the current segment* blk_rq_err_bytes() : bytes left till the next error boundary* blk_rq_sectors() : sectors left in the entire + blk_rq_sectors(rq) == device address in 512 byte sectors Then Return ELEVATOR_BACK_MERGE
912  Else if lk_rq_pos() : the current sector* blk_rq_bytes() : bytes left in the entire request* blk_rq_cur_bytes() : bytes left in the current segment* blk_rq_err_bytes() : bytes left till the next error boundary* blk_rq_sectors() : sectors left in the entire - bio_sectors(bio) == device address in 512 byte sectors Then Return ELEVATOR_FRONT_MERGE
914  Return ELEVATOR_NO_MERGE
Caller
NameDescribe
blk_attempt_plug_mergelk_attempt_plug_merge - try to merge with %current's plugged list*@q: request_queue new bio is being queued at*@bio: new bio being queued*@nr_segs: number of segments in @bio*@same_queue_rq: pointer to &struct request that gets filled in when* another
blk_mq_bio_list_mergeIterate list of requests and see if we can merge this bio with any* of them.