函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-merge.c Create Date:2022-07-27 18:41:42
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:blk_try_merge

函数原型:enum elv_merge blk_try_merge(struct request *rq, struct bio *bio)

返回类型:enum elv_merge

参数:

类型参数名称
struct request *rq
struct bio *bio
908  如果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则返回:ELEVATOR_DISCARD_MERGE
910  否则如果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 则返回:ELEVATOR_BACK_MERGE
912  否则如果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 则返回:ELEVATOR_FRONT_MERGE
914  返回:ELEVATOR_NO_MERGE
调用者
名称描述
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.