Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:blk_try_req_merge

Proto:static enum elv_merge blk_try_req_merge(struct request *req, struct request *next)

Type:enum elv_merge

Parameter:

TypeParameterName
struct request *req
struct request *next
732  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
734  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(req) == 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 Then Return ELEVATOR_BACK_MERGE
737  Return ELEVATOR_NO_MERGE
Caller
NameDescribe
attempt_mergeFor non-mq, this has to be called with the request spinlock acquired.* For mq with scheduling, the appropriate queue wide lock should be held.