From 02e934c0aeedf44c3213829e593f10ccaf4e6bba Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Wed, 7 Oct 2009 03:42:45 +0000 Subject: performance/stat-prefetch: change the cache to use rbtree based hashtable instead of list for caching dentries. Signed-off-by: Anand V. Avati BUG: 284 (performance actually decreases for 'ls -l' on a directory containing large number of files with stat-prefetch loaded) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=284 --- xlators/performance/stat-prefetch/src/stat-prefetch.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.h') diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.h b/xlators/performance/stat-prefetch/src/stat-prefetch.h index 05c5d436184..c17f96f2434 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.h +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.h @@ -28,9 +28,11 @@ #include "glusterfs.h" #include "dict.h" #include "xlator.h" +#include "rbthash.h" +#include "hashfn.h" struct sp_cache { - gf_dirent_t entries; /* Head of list of cached dirents */ + rbthash_table_t *table; uint64_t expected_offset; /* Offset where the next read will * happen. */ -- cgit