Skip to contentSkip to conversation

master - bcache: switch to storing blocks in a radix tree.

PATCH Joe Thornber 1 participant 1 message Jun 1, 2018 Library code

lore
Share & tools
lore
#0 lore raw
Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=7635df8cce131b07b45024e690e4e6917cceb198
Commit:        7635df8cce131b07b45024e690e4e6917cceb198
Parent:        272ec3fa73c92764ef6fe5466fc367fed66dd7f9
Author:        Joe Thornber <[email protected]>
AuthorDate:    Wed May 30 14:17:26 2018 +0100
Committer:     Joe Thornber <[email protected]>
CommitterDate: Wed May 30 14:17:26 2018 +0100

bcache: switch to storing blocks in a radix tree.

Rather than a hash table. This will make invalidate_fd() more efficient since we can iterate just those blocks that are on a particular dev.

---
 lib/Makefile.in     |    1 +
 lib/device/bcache.c |  212 ++++++++++++++++++++++++++++-----------------------
 make.tmpl.in        |    2 +-
 3 files changed, 117 insertions(+), 98 deletions(-)
lib/Makefile.in +1 -0
index 1d42235..4fb4fcf 100644
@@ -21,6 +21,7 @@ ifeq ("@CLUSTER@", "shared")
 endif
 
 SOURCES =\
+	../base/data-struct/radix-tree.c \
 	activate/activate.c \
 	cache/lvmcache.c \
 	cache_segtype/cache.c \
lib/device/bcache.c +115 -97

336 lines not on this page · raw message

make.tmpl.in +1 -1
index 9d5d367..1f999ec 100644
@@ -306,7 +306,7 @@ LIB_VERSION_DM := $(shell $(AWK) -F '.' '{printf "%s.%s",$$1,$$2}' $(top_srcdir)
 
 LIB_VERSION_APP := $(shell $(AWK) -F '[(). ]' '{printf "%s.%s",$$1,$$4}' $(top_srcdir)/VERSION)
 
-INCLUDES += -I$(srcdir) -I$(top_builddir)/include
+INCLUDES += -I$(top_srcdir) -I$(srcdir) -I$(top_builddir)/include
 
 INC_LNS = $(top_builddir)/include/.symlinks_created