diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-10-07 03:42:45 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-07 02:36:20 -0700 |
commit | 02e934c0aeedf44c3213829e593f10ccaf4e6bba (patch) | |
tree | be47a0c1fc01b1ca837d32f7342ee470eacbda39 /xlators/performance/stat-prefetch/src/stat-prefetch.h | |
parent | e2b1e7bb775b2f2f95357550bac786961ec9848a (diff) |
performance/stat-prefetch: change the cache to use rbtree based hashtable instead of list for caching dentries.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
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
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.h')
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.h b/xlators/performance/stat-prefetch/src/stat-prefetch.h index 05c5d4361..c17f96f24 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. */ |