Skip to contentSkip to conversation

Library: [RFC PATCH 2/3] btree_blue - A simple btree with fast linear traverse

PATCH liuwf 1 participant 1 message May 2, 2023 Library code

lore
Share & tools
lore

liuwf

author
#0 lore raw

Library: [RFC PATCH 2/3] btree_blue - A simple btree with fast linear traverse

From: Liu Weifeng 4019c26b5c0d5f6b <[email protected]>

---
 include/linux/btree_blue.h |   4 +-
 lib/btree_blue.c           | 170 +++++++++++++++++++++++++------------
 2 files changed, 118 insertions(+), 56 deletions(-)
include/linux/btree_blue.h +2 -2
index 2f1a7781c77b..62217b96cb4e 100644
@@ -17,16 +17,16 @@ struct btree_blue_node_cb;
 
 struct btree_blue_head {
 	unsigned long *node;
-	mempool_t *mempool;
 
 	u16 node_size;
+	u16 leaf_size;
 	u16 stub_base;
 	u8 keylen;
 	u8 slot_width;
 	u8 height;
 	u8 reserved[1];
 
-	u16 vols[MAX_TREE_HEIGHT + 1];
+	u16 slot_vols[MAX_TREE_HEIGHT + 1];
 };
 
 void *btree_blue_alloc(gfp_t gfp_mask, void *pool_data);
lib/btree_blue.c +116 -54

308 lines not on this page · raw message

Signature · 1 line
2.30.2