summaryrefslogtreecommitdiffstats
path: root/xlators/cluster
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/cluster')
-rw-r--r--xlators/cluster/afr/src/afr.c7
-rw-r--r--xlators/cluster/ec/src/ec.c19
2 files changed, 16 insertions, 10 deletions
diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c
index 1df45b5a68f..ceaa034dbbb 100644
--- a/xlators/cluster/afr/src/afr.c
+++ b/xlators/cluster/afr/src/afr.c
@@ -89,6 +89,10 @@ static void
fix_quorum_options (xlator_t *this, afr_private_t *priv, char *qtype,
dict_t *options)
{
+
+ gf_log (this->name, GF_LOG_INFO,
+ "reindeer: incoming qtype = %s", qtype);
+
if (dict_get (options, "quorum-type") == NULL) {
/* If user doesn't configure anything enable auto-quorum if the
* replica has more than two subvolumes */
@@ -107,6 +111,9 @@ fix_quorum_options (xlator_t *this, afr_private_t *priv, char *qtype,
} else if (!strcmp (qtype, "auto")) {
priv->quorum_count = AFR_QUORUM_AUTO;
}
+
+ gf_log (this->name, GF_LOG_INFO,
+ "reindeer: quorum_count = %d", priv->quorum_count);
}
int
diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c
index 4d550176f19..7b16f8fd255 100644
--- a/xlators/cluster/ec/src/ec.c
+++ b/xlators/cluster/ec/src/ec.c
@@ -419,12 +419,11 @@ ec_launch_notify_timer (xlator_t *this, ec_t *ec)
void
ec_handle_up (xlator_t *this, ec_t *ec, int32_t idx)
{
- if (((ec->xl_notify >> idx) & 1) == 0) {
- ec->xl_notify |= 1ULL << idx;
- ec->xl_notify_count++;
- }
-
if (((ec->xl_up >> idx) & 1) == 0) { /* Duplicate event */
+ if (((ec->xl_notify >> idx) & 1) == 0) {
+ ec->xl_notify |= 1ULL << idx;
+ ec->xl_notify_count++;
+ }
ec->xl_up |= 1ULL << idx;
ec->xl_up_count++;
}
@@ -433,14 +432,14 @@ ec_handle_up (xlator_t *this, ec_t *ec, int32_t idx)
void
ec_handle_down (xlator_t *this, ec_t *ec, int32_t idx)
{
- if (((ec->xl_notify >> idx) & 1) == 0) {
- ec->xl_notify |= 1ULL << idx;
- ec->xl_notify_count++;
- }
-
if (((ec->xl_up >> idx) & 1) != 0) { /* Duplicate event */
gf_msg_debug (this->name, 0, "Child %d is DOWN", idx);
+ if (((ec->xl_notify >> idx) & 1) == 0) {
+ ec->xl_notify |= 1ULL << idx;
+ ec->xl_notify_count++;
+ }
+
ec->xl_up ^= 1ULL << idx;
ec->xl_up_count--;
}