Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bfq_rq_pos_tree_lookup

Proto:static struct bfq_queue *bfq_rq_pos_tree_lookup(struct bfq_data *bfqd, struct rb_root *root, sector_t sector, struct rb_node **ret_parent, struct rb_node ***rb_link)

Type:struct bfq_queue

Parameter:

TypeParameterName
struct bfq_data *bfqd
struct rb_root *root
sector_tsector
struct rb_node **ret_parent
struct rb_node ***rb_link
556  struct bfq_queue * bfqq = NULL
558  parent = NULL
559  p = rb_node
560  When p cycle
563  parent = p
564  bfqq = rb_entry(parent, structbfq_queue, pos_node)
570  If sector > 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 n = rb_right
572  Else if sector < 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 n = rb_left
574  Else Break
576  p = n
577  bfqq = NULL
580  ret_parent = parent
581  If rb_link Then rb_link = p
584  bfq_log(bfqd, "rq_pos_tree_lookup %llu: returning %d", (unsignedlonglong)sector, bfqq ? pid of the process owning the queue, used for logging purposes : 0)
588  Return bfqq
Caller
NameDescribe
bfq_pos_tree_add_moveThe following function is not marked as __cold because it is* actually cold, but for the same performance goal described in the* comments on the likely() at the beginning of* bfq_setup_cooperator()
bfqq_find_close