diff options
Diffstat (limited to 'xlators/cluster/dht/src/dht-common.c')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 34430eabef9..b7a61be7d47 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -4755,10 +4755,6 @@ dht_notify (xlator_t *this, int event, void *data, ...) dht_conf_t *conf = NULL; int ret = -1; - /* Notify is on by default for all events except CHILD_UP. Do not - * notify parent for CHILD_UP till all distribute children have come up. - */ - int notify = 1; conf = this->private; if (!conf) @@ -4786,13 +4782,7 @@ dht_notify (xlator_t *this, int event, void *data, ...) LOCK (&conf->subvolume_lock); { - if (!conf->subvolume_status[cnt]) { - conf->subvolume_status[cnt] = 1; - ++conf->upsubvols; - } - - if (conf->upsubvols != conf->subvolume_cnt) - notify = 0; + conf->subvolume_status[cnt] = 1; } UNLOCK (&conf->subvolume_lock); @@ -4820,18 +4810,14 @@ dht_notify (xlator_t *this, int event, void *data, ...) LOCK (&conf->subvolume_lock); { - if (conf->subvolume_status[cnt]) { - conf->subvolume_status[cnt] = 0; - --conf->upsubvols; - } + conf->subvolume_status[cnt] = 0; } UNLOCK (&conf->subvolume_lock); break; } - if (notify) - ret = default_notify (this, event, data); + ret = default_notify (this, event, data); return ret; } |