diff options
author | Flavio Cruz <flaviocruz@gmail.com> | 2016-02-14 18:37:54 -0500 |
---|---|---|
committer | Justus Winter <justus@gnupg.org> | 2016-02-15 01:13:07 +0100 |
commit | 63ac03bc069b81559b04596d6b337880c3351700 (patch) | |
tree | 2e8e91a888d3d42d95c9041ebe917fae028504f8 /nfs/nfs.h | |
parent | 254a4d43674a0d5fe8f8475e3b625924691048d3 (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.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 */ |