函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:btree_remove_level

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

返回类型:void

参数:

类型参数名称
struct btree_head *head
struct btree_geo *geo
unsigned long *key
intlevel
598  如果level大于height
600  height等于0
601  node = NULL
602  返回:NULL
605  node等于locate the correct leaf node in the btree
606  pos等于getpos(geo, node, key)
607  fill等于getfill(geo, node, pos)
608  如果level恒等于1且keycmp(geo, node, pos, key)不等于0则返回:NULL
610  ret等于bval(geo, node, pos)
613 i小于fill减1循环
614  setkey(geo, node, i, bkey(geo, node, i + 1))
615  setval(geo, node, i, bval(geo, node, i + 1))
617  clearpair(geo, node, fill - 1)
619  如果fill减1小于no_pairs除2则
620  如果level小于heightrebalance(head, geo, key, level, node, fill - 1)
622  否则如果fill减1恒等于1则btree_shrink(head, geo)
626  返回:ret
调用者
名称描述
merge
rebalance
btree_remove溢出btree项