From 52b5c7e8db6e6742dd6d7bf1548c6d33e149f59a Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Wed, 24 Jun 2015 02:30:01 +0200 Subject: libdiskfs: use ihash for the node cache Replace the hand-written hash table in the node cache with libihash. Libihash is a self-tuning hash table, whereas the previous code used a fixed number of buckets. * libdiskfs/Makefile (HURDLIBS): Link to `ihash'. * libdiskfs/diskfs.h (struct node): Remove bucket list, add slot pointer. * libdiskfs/node-cache.c (nodecache): New ihash table replacing the old `nodehash'. (lookup): Drop function. (diskfs_cached_lookup_context): Adapt accordingly. (diskfs_cached_ifind): Likewise. (diskfs_try_dropping_softrefs): Likewise. (diskfs_node_iterate): Likewise. --- libdiskfs/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libdiskfs/Makefile') diff --git a/libdiskfs/Makefile b/libdiskfs/Makefile index 47b93390..803761d1 100644 --- a/libdiskfs/Makefile +++ b/libdiskfs/Makefile @@ -61,7 +61,7 @@ MIGSTUBS = fsServer.o ioServer.o fsysServer.o exec_startupServer.o \ startup_notifyServer.o OBJS = $(sort $(SRCS:.c=.o) $(MIGSTUBS)) -HURDLIBS = fshelp iohelp store ports shouldbeinlibc pager +HURDLIBS = fshelp iohelp store ports shouldbeinlibc pager ihash LDLIBS += -lpthread fsys-MIGSFLAGS = -imacros $(srcdir)/fsmutations.h -DREPLY_PORTS -- cgit v1.2.3