summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-11-24 20:46:48 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-11-24 23:06:12 -0800
commitca4c8115a839568405e1dea2f4bda01f43357921 (patch)
tree2c21a214a94705bbf0b537e25fe522a02733b566 /xlators/performance/stat-prefetch/src/stat-prefetch.h
parent81af21adec38eb04de19694af1b3ce8a1a095ab7 (diff)
performance/stat-prefetch: remove lock member in sp_fd_ctx_t.
- since the lifetime of fd context can be no longer than the fd, we can use lock in fd. 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 'xlators/performance/stat-prefetch/src/stat-prefetch.h')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.h b/xlators/performance/stat-prefetch/src/stat-prefetch.h
index a2c1e4f162d..6e329003e8a 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.h
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.h
@@ -37,25 +37,25 @@
struct sp_cache {
rbthash_table_t *table;
- uint64_t expected_offset; /* Offset where the next read will
- * happen.
- */
- gf_lock_t lock;
- unsigned long miss;
- unsigned long hits;
+ uint64_t expected_offset; /* Offset where the next read will
+ * happen.
+ */
+ gf_lock_t lock;
+ unsigned long miss;
+ unsigned long hits;
+ uint32_t ref;
};
typedef struct sp_cache sp_cache_t;
struct sp_fd_ctx {
sp_cache_t *cache;
- inode_t *parent_inode; /*
+ inode_t *parent_inode; /*
* inode corresponding to dirname (path)
*/
char *name; /*
- * basename of path on which this fd is
+ * basename of path on which this fd is
* opened
*/
- gf_lock_t lock;
};
typedef struct sp_fd_ctx sp_fd_ctx_t;