diff options
author | Anuradha Talur <atalur@redhat.com> | 2015-11-12 19:41:33 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2015-11-24 19:06:02 -0800 |
commit | 5172bcb757553e05b18208d7726517f1ec4da837 (patch) | |
tree | da7f9ec1dfc18e5e2e15088eb55f327cb15ec263 /xlators/features/index/src/index.h | |
parent | 4348a6af89085cbdb41963f828b88deee4a109f1 (diff) |
features/index : Readdirp performance improvement
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: 1250803
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>
Diffstat (limited to 'xlators/features/index/src/index.h')
-rw-r--r-- | xlators/features/index/src/index.h | 15 |
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 ...) \ |