diff options
author | Vikas Gorur <vikas@gluster.com> | 2009-04-02 08:31:23 -0700 |
---|---|---|
committer | Anand V. Avati <avati@amp.gluster.com> | 2009-04-02 21:08:00 +0530 |
commit | 75c70231fe7e13a68239dac889568d243a79a75e (patch) | |
tree | b8b643c3c2eca08535d262195cceaf350ab7adcd /xlators/cluster/afr/src/afr.h | |
parent | 1e7c9fa93716844e60d41811b8b79f8605a5044c (diff) |
Load balance read operations among subvolumes in afr
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr.h')
-rw-r--r-- | xlators/cluster/afr/src/afr.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr.h b/xlators/cluster/afr/src/afr.h index 5db6e98092a..a447b74f47b 100644 --- a/xlators/cluster/afr/src/afr.h +++ b/xlators/cluster/afr/src/afr.h @@ -35,6 +35,9 @@ typedef struct _afr_private { gf_lock_t lock; /* to guard access to child_count, etc */ unsigned int child_count; /* total number of children */ + unsigned int read_child_rr; /* round-robin index of the read_child */ + gf_lock_t read_child_lock; /* lock to protect above */ + xlator_t **children; unsigned char *child_up; @@ -48,7 +51,7 @@ typedef struct _afr_private { gf_boolean_t metadata_change_log; /* on/off */ gf_boolean_t entry_change_log; /* on/off */ - unsigned int read_child; /* read-subvolume */ + int read_child; /* read-subvolume */ unsigned int favorite_child; /* subvolume to be preferred in resolving split-brain cases */ @@ -110,7 +113,8 @@ typedef struct _afr_local { unsigned int need_data_self_heal; unsigned int govinda_gOvinda; - unsigned int reval_child_index; + unsigned int read_child_index; + int32_t op_ret; int32_t op_errno; |