From 63ac03bc069b81559b04596d6b337880c3351700 Mon Sep 17 00:00:00 2001 From: Flavio Cruz Date: Sun, 14 Feb 2016 18:37:54 -0500 Subject: nfs: Use libihash for the node cache. * nfs/cache.c: Remove old node cache and use libihash. Use a pointer to the node handle as the key and the node itself as the value. Use netfs_make_node_alloc to allow libihash to set 'slot'. * nfs/nfs.c: Pass in a struct handle instead. * nfs/nfs.h: Add a hurd_ihash_locp_t field and remove hnext and hprevp. --- nfs/nfs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nfs/nfs.h') diff --git a/nfs/nfs.h b/nfs/nfs.h index 18dec001..8424acb2 100644 --- a/nfs/nfs.h +++ b/nfs/nfs.h @@ -24,6 +24,7 @@ #include #include #include "nfs-spec.h" +#include #include /* A file handle */ @@ -39,9 +40,9 @@ struct fhandle node. */ struct netnode { + hurd_ihash_locp_t slot; struct fhandle handle; time_t stat_updated; - struct node *hnext, **hprevp; /* These two fields handle translators set internally but unknown to the server. */ @@ -192,7 +193,7 @@ void *timeout_service_thread (void *); void *rpc_receive_thread (void *); /* cache.c */ -void lookup_fhandle (void *, size_t, struct node **); +void lookup_fhandle (struct fhandle *, struct node **); int *recache_handle (int *, struct node *); /* name-cache.c */ -- cgit v1.2.3