Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:locate the correct leaf node in the btree

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

Type:unsigned long

Parameter:

TypeParameterName
struct btree_head *head
struct btree_geo *geo
unsigned long *key
intlevel
391  node = node
394  When height > level cycle
395  When i < no_pairs cycle If keycmp(geo, node, i, key) <= 0 Then
397  Break
399  If i == no_pairs || Not bval(geo, node, i) Then
403  i--
404  setkey(geo, node, i, key)
406  BUG_ON(i < 0)
407  node = bval(geo, node, i)
409  BUG_ON(!node)
410  Return node
Caller
NameDescribe
btree_insert_level
rebalance
btree_remove_level