1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-27 10:25:13 +03:00
Commit Graph

16 Commits

Author SHA1 Message Date
Joe Thornber
254e5c5d11 radix-tree: squash a pointer arithmetic warning 2018-06-21 17:41:56 +01:00
Joe Thornber
72e2e92f4c radix-tree: fix bug when erasing elts in remove_prefix
_erase_elt() now zeroes the last element of the array (ie. sets to
UNSET).  Previously remove() was doing this, but not remove_prefix().
2018-06-21 17:10:05 +01:00
Joe Thornber
40c1f7889f radix-tree: More debugging of remove
There's now a pretty printer called radix_tree_dump()

n4, n16, and n48 weren't UNSETting the last entry after
sliding values down.
2018-06-21 09:49:43 +01:00
Joe Thornber
20b9746c5d radix-tree: FIx various bugs to do with removal
Add radix_tree_is_well_formed() which does some sanity checking
of the tree.

Call the above a lot in the unit tests.

Fix revealed bugs.
2018-06-21 09:49:08 +01:00
Joe Thornber
61e67e51e1 device_mapper: move hash.[hc] to base/data-struct 2018-06-08 13:54:19 +01:00
Joe Thornber
88ae928ca3 base: Move list to base/data-struct 2018-06-08 11:24:18 +01:00
Joe Thornber
2eda683a20 build: base/Makefile
.gitignore hid it.
2018-06-04 15:37:35 +01:00
Joe Thornber
06c789eda1 radix-tree: fix some bugs in remove_prefix and iterate
These weren't working if the prefix key was part of a prefix_chain.
2018-05-30 14:21:27 +01:00
Joe Thornber
1924426ad1 radix-tree: radix_tree_iterate() 2018-05-29 17:58:58 +01:00
Joe Thornber
c2a8bbed3b radix-tree: radix_tree_remove_prefix() 2018-05-29 13:25:59 +01:00
Joe Thornber
9b41efae82 radix-tree: call the value dtr when removing an entry. 2018-05-29 11:23:36 +01:00
Joe Thornber
0181c77e3f Merge branch '2018-05-29-radix-tree-iterate' into 2018-05-23-radix-tree-remove 2018-05-29 11:04:32 +01:00
Joe Thornber
033df741e2 data-struct/radix-tree: pass the value dtr into create.
Rather than having to pass it into every method that removes items.
2018-05-29 11:03:10 +01:00
Joe Thornber
b7fd8ac8eb radix_tree: add remove method 2018-05-23 12:48:06 +01:00
Joe Thornber
30a4c7988e radix-tree: remove some unneccessary includes 2018-05-11 09:46:34 +01:00
Joe Thornber
576dd1fc41 radix-tree: First drop of radix tree.
An implementation of an adaptive radix tree.  Has the following nice
properties:

  - At least as fast as the hash table
  - Uses less memory
  - You don't need to give an expected size when you create
  - It scales nicely (ie. no large reallocations like the hash table).
  - You can iterate the keys in lexicographical order.

Only insert and lookup are implemented so far.  Plus there's a lot
more performance to come.
2018-05-11 06:10:01 +01:00