Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\btree.c Create Date:2022-07-28 06:53:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:btree_remove_level

Proto:static void *btree_remove_level(struct btree_head *head, struct btree_geo *geo, unsigned long *key, int level)

Type:void

Parameter:

TypeParameterName
struct btree_head *head
struct btree_geo *geo
unsigned long *key
intlevel
598  If level > height Then
600  height = 0
601  node = NULL
602  Return NULL
605  node = locate the correct leaf node in the btree
606  pos = getpos(geo, node, key)
607  fill = getfill(geo, node, pos)
608  If level == 1 && keycmp(geo, node, pos, key) != 0 Then Return NULL
610  ret = bval(geo, node, pos)
613  When i < fill - 1 cycle
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  If fill - 1 < no_pairs / 2 Then
620  If level < height Then rebalance(head, geo, key, level, node, fill - 1)
622  Else if fill - 1 == 1 Then btree_shrink(head, geo)
626  Return ret
Caller
NameDescribe
merge
rebalance
btree_remove