Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:RB-tree support functions for inserting/lookup/removal of requests* in a sorted RB tree.

Proto:void elv_rb_add(struct rb_root *root, struct request *rq)

Type:void

Parameter:

TypeParameterName
struct rb_root *root
struct request *rq
257  p = rb_node
258  struct rb_node * parent = NULL
261  When p cycle
262  parent = p
263  __rq = rb_entry(parent, structrequest, rb_node)
265  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 < 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 p = rb_left
267  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 >= 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 p = rb_right
271  rb_link_node( & sort/lookup , parent, p)
272  rb_insert_color( & sort/lookup , root)
Caller
NameDescribe
deadline_add_rq_rb
bfq_add_request
bfq_request_merged