diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-11-24 20:46:34 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-11-24 23:06:09 -0800 |
commit | 81af21adec38eb04de19694af1b3ce8a1a095ab7 (patch) | |
tree | 9d9eafec207e0f8e9499a957e7716b5733a3226d /commit.sh | |
parent | 250edc9e494fe0c59eff580df18080111ecb475e (diff) |
performance/stat-prefetch: don't free the cache in readdir if the offset is not the expected one.
- cache creation is expensive operation. Also, cache will be freed in
releasedir. Hence, just remove all entries from cache without freeing
the cache. However this is not entirely true, since sp_cache_remove_entry
frees the old table and reinitializes a new table if all entries are being
removed. When rbtree based hash table provides an interface to remove all
the entries, sp_cache_remove_entry should be modified not to destroy the
table.
- this patch also fixes a race condition wherein the cache being used in
lookup getting freed in readdir if the offset is not equal to expected
offset.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 405 (Segmentation fault in stat-prefetch.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=405
Diffstat (limited to 'commit.sh')
0 files changed, 0 insertions, 0 deletions