summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.h
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-10-07 10:08:46 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-07 23:04:23 -0700
commit64bba90418fd037708f38c4a4e0b73c89a11ea5f (patch)
tree979096e01bb53ecdeb67a437be65eaad1c960a36 /xlators/performance/stat-prefetch/src/stat-prefetch.h
parentc4cba07caf188cae38ae4e3008526ea79e924abb (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: 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.h15
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 dd6b067c5..068ea7dfe 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.h
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.h
@@ -30,6 +30,10 @@
#include "xlator.h"
#include "rbthash.h"
#include "hashfn.h"
+#include "call-stub.h"
+#include "locking.h"
+#include "inode.h"
+#include <libgen.h>
struct sp_cache {
rbthash_table_t *table;
@@ -55,9 +59,20 @@ struct sp_fd_ctx {
};
typedef struct sp_fd_ctx sp_fd_ctx_t;
+struct sp_inode_ctx {
+ char looked_up;
+ char lookup_in_progress;
+ int32_t op_ret;
+ int32_t op_errno;
+ gf_lock_t lock;
+ struct list_head waiting_ops;
+};
+typedef struct sp_inode_ctx sp_inode_ctx_t;
+
struct sp_local {
loc_t loc;
fd_t *fd;
+ char is_lookup;
};
typedef struct sp_local sp_local_t;