函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rebalance

函数原型:static void rebalance(struct btree_head *head, struct btree_geo *geo, unsigned long *key, int level, unsigned long *child, int fill)

返回类型:void

参数:

类型参数名称
struct btree_head *head
struct btree_geo *geo
unsigned long *key
intlevel
unsigned long *child
intfill
543  unsigned long * parent, * left = NULL, * right = NULL
546  如果fill恒等于0则
551  btree_remove_level(head, geo, key, level + 1)
552  mempool_free - return an element to the pool.*@element: pool element pointer.*@pool: pointer to the memory pool which was allocated via* mempool_create().* this function only sleeps if the free_fn() function sleeps.
553  返回
556  parent等于locate the correct leaf node in the btree
557  i等于getpos(geo, parent, key)
558  BUG_ON(bval(geo, parent, i) != child)
560  如果i大于0则
561  left等于bval(geo, parent, i - 1)
562  no_left等于getfill(geo, left, 0)
563  如果fillno_left小于等于no_pairs
564  merge(head, geo, level, left, no_left, child, fill, parent, i - 1)
568  返回
571  如果i加1小于getfill(geo, parent, i)则
572  right等于bval(geo, parent, i + 1)
573  no_right等于getfill(geo, right, 0)
574  如果fillno_right小于等于no_pairs
579  返回
调用者
名称描述
btree_remove_level