summaryrefslogtreecommitdiffstats
path: root/xlators/features/index/src/index.h
diff options
context:
space:
mode:
authorAnuradha Talur <atalur@redhat.com>2015-11-12 19:41:33 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2015-12-21 01:16:20 -0800
commit95a576dec754af6609c5356e07003c54058eb675 (patch)
treeac093c1068ae7df0cd642a8ccc5005d141262033 /xlators/features/index/src/index.h
parent63b5f373c7bd7d78d49b06c4c03e43941ffbfbd9 (diff)
features/index : Readdirp performance improvement
Backport of: http://review.gluster.org/#/c/12468 Things done : Index now maintains two different directories : 1) for pending xattrs (trusted.afr.volname-client-n, trusted.ec.dirty) 2) for on going xattrs (trusted.afr.dirty) Based on the xattr, index decides the directory to add/del entry in/from. Change-Id: Ie04c02ea2d862cf80426a871a9a1e80b0773d9fd BUG: 1287531 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/12468 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/12852 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
Diffstat (limited to 'xlators/features/index/src/index.h')
-rw-r--r--xlators/features/index/src/index.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/xlators/features/index/src/index.h b/xlators/features/index/src/index.h
index a8dfe067ae1..bec0152a145 100644
--- a/xlators/features/index/src/index.h
+++ b/xlators/features/index/src/index.h
@@ -26,10 +26,16 @@ typedef enum {
NOTIN
} index_state_t;
+typedef enum {
+ PENDING,
+ DIRTY,
+ XATTROP_TYPE_END
+} index_xattrop_type_t;
+
typedef struct index_inode_ctx {
gf_boolean_t processing;
struct list_head callstubs;
- index_state_t state;
+ int state[XATTROP_TYPE_END];
} index_inode_ctx_t;
typedef struct index_fd_ctx {
@@ -39,13 +45,18 @@ typedef struct index_fd_ctx {
typedef struct index_priv {
char *index_basepath;
+ char *dirty_basepath;
uuid_t index;
gf_lock_t lock;
uuid_t xattrop_vgfid;//virtual gfid of the xattrop index dir
+ uuid_t dirty_vgfid; // virtual gfid of the on-going/dirty index dir
struct list_head callstubs;
pthread_mutex_t mutex;
pthread_cond_t cond;
- dict_t *xattrop64_watchlist;
+ dict_t *dirty_watchlist;
+ dict_t *pending_watchlist;
+ dict_t *complete_watchlist;
+ int64_t pending_count;
} index_priv_t;
#define INDEX_STACK_UNWIND(fop, frame, params ...) \