diff options
author | Raghavendra G <raghavendra@gluster.com> | 2009-10-08 06:21:07 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-09 00:48:34 -0700 |
commit | 2dc9d11fe1c8aaeba972c6fd693de1f32e5e3f1a (patch) | |
tree | 81e74c8073f490376e314dfcbd7063053684c439 /xlators/performance/stat-prefetch/src/stat-prefetch.h | |
parent | 490edcd9f76726e5cc46bf9e7ddd69e496d32d7b (diff) |
performance/stat-prefetch: Add support code to implement lookup-behind.
- change sp_lookup and sp_lookup_cbk to support sending lookups when needed.
lookups might need to be sent in fops like open, chmod, chown etc which
operate on a path, since the actual lookup sent to stat-prefetch by its
parent xlators is not propagated down the xlator tree if the path is
cached.
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 | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.h b/xlators/performance/stat-prefetch/src/stat-prefetch.h index dd6b067c5bd..81f504a7f31 100644 --- a/xlators/performance/stat-prefetch/src/stat-prefetch.h +++ b/xlators/performance/stat-prefetch/src/stat-prefetch.h @@ -25,11 +25,15 @@ #include "config.h" #endif +#include "locking.h" +#include "inode.h" #include "glusterfs.h" #include "dict.h" #include "xlator.h" #include "rbthash.h" #include "hashfn.h" +#include "call-stub.h" +#include <libgen.h> struct sp_cache { rbthash_table_t *table; @@ -58,9 +62,20 @@ typedef struct sp_fd_ctx sp_fd_ctx_t; struct sp_local { loc_t loc; fd_t *fd; + char is_lookup; }; typedef struct sp_local sp_local_t; +struct sp_inode_ctx { + char looked_up; + char lookup_in_progress; + int32_t op_ret; + int32_t op_errno; + struct stat stbuf; + gf_lock_t lock; + struct list_head waiting_ops; +}; +typedef struct sp_inode_ctx sp_inode_ctx_t; void sp_local_free (sp_local_t *local); |