summaryrefslogtreecommitdiff
path: root/support/misc
diff options
context:
space:
mode:
authorTomas Richter <krik3t@gmail.com>2009-02-18 13:33:27 -0500
committerSteve Dickson <steved@redhat.com>2009-02-18 13:33:27 -0500
commit4cacc965afc4fb03a465ffcc6cb3078aeadc3818 (patch)
tree59f99682f299fbc6d0a877c484d6fde4a11528cb /support/misc
parent35001db4aaafa8a17e13b8c13cf74508d4a93f2f (diff)
downloadnfs-utils-4cacc965afc4fb03a465ffcc6cb3078aeadc3818.tar.gz
Exportfs and rpc.mountd optimalization
There were some problems with exportfs and rpc.mountd for long export lists - see https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=76643 I do optimalization as my bachelors thesis (Facuulty of informatics, Masaryk's university Brno, Czech Republic), under lead of Yenya Kasprzak. Both exportfs and rpc.mount build linked list of exports (shared functions in export.c). Every time they are inserting new export into list, they search for same export in list. I replaced linked list by hash table and functions export_add and export_lookup by functions hash_export_add and hash_export_lookup (export.c). Because some other functions required exportlist as linked list, hash table has some implementation modification im comparison with ordinary hash table. It also keeps exports in linked list and has pointer to head of the list. So there's no need of implementation function <for_all_in_hash_table>. Signed-off-by: Tomas Richter <krik3t@gmail.com> Signed-off-by: Steve Dickson <steved@redhat.com>
Diffstat (limited to 'support/misc')
-rw-r--r--support/misc/tcpwrapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/support/misc/tcpwrapper.c b/support/misc/tcpwrapper.c
index 977dfca..e9eb1df 100644
--- a/support/misc/tcpwrapper.c
+++ b/support/misc/tcpwrapper.c
@@ -122,7 +122,7 @@ inline unsigned int strtoint(char *str)
return n;
}
-inline int hashint(unsigned int num)
+static inline int hashint(unsigned int num)
{
return num % HASH_TABLE_SIZE;
}