diff options
author | Anuradha Talur <atalur@redhat.com> | 2015-11-23 15:56:28 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2015-12-02 16:00:16 -0800 |
commit | 9c378026e9561595586a817fee0b439e2c863a22 (patch) | |
tree | ec8ed984a3ec4ec451913758403bf536a0f07e80 /xlators/cluster/afr/src/afr-self-heal-common.c | |
parent | cb7da0ffba147173bc9e6cd05f0a88a2c1ac9cdc (diff) |
heal : Changed heal info to process all indices directories
Change-Id: Ida863844e14309b6526c1b8434273fbf05c410d2
BUG: 1250803
Signed-off-by: Anuradha Talur <atalur@redhat.com>
Reviewed-on: http://review.gluster.org/12658
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-self-heal-common.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index bd234af789e..49c6bd0cc98 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -528,7 +528,8 @@ afr_selfheal_find_direction (call_frame_t *frame, xlator_t *this, struct afr_reply *replies, afr_transaction_type type, unsigned char *locked_on, unsigned char *sources, - unsigned char *sinks, uint64_t *witness) + unsigned char *sinks, uint64_t *witness, + gf_boolean_t *pflag) { afr_private_t *priv = NULL; int i = 0; @@ -548,15 +549,25 @@ afr_selfheal_find_direction (call_frame_t *frame, xlator_t *this, matrix = ALLOC_MATRIX(priv->child_count, int); memset (witness, 0, sizeof (*witness) * priv->child_count); + /* First construct the pending matrix for further analysis */ + afr_selfheal_extract_xattr (this, replies, type, dirty, matrix); + + if (pflag) { + for (i = 0; i < priv->child_count; i++) { + for (j = 0; j < priv->child_count; j++) + if (matrix[i][j]) + *pflag = _gf_true; + if (*pflag) + break; + } + } + if (afr_success_count (replies, priv->child_count) < AFR_SH_MIN_PARTICIPANTS) { /* Treat this just like locks not being acquired */ return -ENOTCONN; } - /* First construct the pending matrix for further analysis */ - afr_selfheal_extract_xattr (this, replies, type, dirty, matrix); - /* short list all self-accused */ for (i = 0; i < priv->child_count; i++) { if (matrix[i][i]) |