diff options
author | Anand Avati <avati@gluster.com> | 2010-10-11 07:30:30 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-10-11 07:31:37 -0700 |
commit | 4868116c1ca08868abe69c271dc108f1d0b5a227 (patch) | |
tree | 4fb85460bed5b191efbc764f3f7e72edb1aa0b21 /xlators | |
parent | 563ef3d12f8d7a927b403d04c279d9fc702faad0 (diff) |
Revert "distribute: Propagate CHILD-UP when all subvols are up"
This reverts commit 6b2e2fb0903fc56105c267881f202a4865a8b6c7.
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1643 (Initial requests after mount ESTALE if DHT subvolumes connect after nfs startup)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1643
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 20 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 1 |
2 files changed, 3 insertions, 18 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 34430eabe..b7a61be7d 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; } diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index bb601d55a..32e5cf566 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -159,7 +159,6 @@ struct dht_conf { void *private; /* Can be used by wrapper xlators over dht */ gf_boolean_t use_readdirp; - int upsubvols; /* Count the number of online children*/ }; typedef struct dht_conf dht_conf_t; |