diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-08-26 01:36:53 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-09-08 01:41:08 -0700 |
commit | 8c110d0aba119d199e2e8d29418ed45119aeb30c (patch) | |
tree | 455a204c8ba4450b2384bc59e450955cfb1c22d0 /xlators/performance/stat-prefetch/src/stat-prefetch.h | |
parent | 3a0317982bfc8c507cfaf8dc919d5f4bab4371f7 (diff) |
performance/stat-prefetch: introduce sp_fd_ctx_t to hold context of fds
- we need following extra members along with cache
1. basename of path on which fd is opened. This is necessary to search
for cached entry in fd based fops.
2. inode corresponding to dirname of path on which fd is opened. This
is necessary to get cache where entry corresponding to file on which
fd is opened.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 221 (stat prefetch implementation)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.h')
-rw-r--r-- | xlators/performance/stat-prefetch/src/stat-prefetch.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.h b/xlators/performance/stat-prefetch/src/stat-prefetch.h index 4a45261a4d4..05c5d436184 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.h +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.h @@ -38,6 +38,19 @@ struct sp_cache { }; typedef struct sp_cache sp_cache_t; +struct sp_fd_ctx { + sp_cache_t *cache; + inode_t *parent_inode; /* + * inode corresponding to dirname (path) + */ + char *name; /* + * basename of path on which this fd is + * opened + */ + gf_lock_t lock; +}; +typedef struct sp_fd_ctx sp_fd_ctx_t; + struct sp_local { loc_t loc; fd_t *fd; |