函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:bfq_rq_pos_tree_lookup

函数原型: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)

返回类型:struct bfq_queue

参数:

类型参数名称
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 p循环
563  parent等于p
564  bfqq等于rb_entry(parent, structbfq_queue, pos_node)
570  如果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 n等于rb_right
572  否则如果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 n等于rb_left
574  否则退出
576  p等于n
577  bfqq = NULL
580  ret_parent等于parent
581  如果rb_linkrb_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  返回:bfqq
调用者
名称描述
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