summaryrefslogtreecommitdiff
path: root/nfs/nfs.h
diff options
context:
space:
mode:
authorFlavio Cruz <flaviocruz@gmail.com>2016-02-14 18:37:54 -0500
committerJustus Winter <justus@gnupg.org>2016-02-15 01:13:07 +0100
commit63ac03bc069b81559b04596d6b337880c3351700 (patch)
tree2e8e91a888d3d42d95c9041ebe917fae028504f8 /nfs/nfs.h
parent254a4d43674a0d5fe8f8475e3b625924691048d3 (diff)
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.
Diffstat (limited to 'nfs/nfs.h')
-rw-r--r--nfs/nfs.h5
1 files changed, 3 insertions, 2 deletions
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 <pthread.h>
#include <sys/mman.h>
#include "nfs-spec.h"
+#include <hurd/ihash.h>
#include <hurd/netfs.h>
/* 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 */