diff options
-rw-r--r-- | libglusterfs/src/defaults.c | 1 | ||||
-rw-r--r-- | libglusterfs/src/glusterfs.h | 1 | ||||
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 9 |
4 files changed, 14 insertions, 1 deletions
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index 718afeb9ac2..00f84694a06 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -1218,6 +1218,7 @@ default_notify (xlator_t *this, int32_t event, void *data, ...) } break; case GF_EVENT_CHILD_CONNECTING: + case GF_EVENT_CHILD_MODIFIED: case GF_EVENT_CHILD_UP: { xlator_list_t *parent = this->parents; diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index a995d4ebffb..aaf00c31158 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -332,6 +332,7 @@ typedef enum { GF_EVENT_CHILD_UP, GF_EVENT_CHILD_DOWN, GF_EVENT_CHILD_CONNECTING, + GF_EVENT_CHILD_MODIFIED, GF_EVENT_TRANSPORT_CLEANUP, GF_EVENT_TRANSPORT_CONNECTED, GF_EVENT_VOLFILE_MODIFIED, diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 4b59d26db32..ffd2200066f 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -2552,6 +2552,8 @@ afr_notify (xlator_t *this, int32_t event, "going online.", ((xlator_t *)data)->name); default_notify (this, event, data); + } else { + default_notify (this, GF_EVENT_CHILD_MODIFIED, data); } break; @@ -2582,6 +2584,8 @@ afr_notify (xlator_t *this, int32_t event, "until atleast one of them comes back up."); default_notify (this, event, data); + } else { + default_notify (this, GF_EVENT_CHILD_MODIFIED, data); } break; diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c index 18f15696b16..ef8fb1a602a 100644 --- a/xlators/cluster/dht/src/dht-common.c +++ b/xlators/cluster/dht/src/dht-common.c @@ -5046,6 +5046,13 @@ dht_notify (xlator_t *this, int event, void *data, ...) break; + case GF_EVENT_CHILD_MODIFIED: + subvol = data; + + conf->gen++; + + break; + case GF_EVENT_CHILD_DOWN: subvol = data; @@ -5134,7 +5141,7 @@ dht_notify (xlator_t *this, int event, void *data, ...) } } - if (propagate) + if (propagate || event == GF_EVENT_CHILD_MODIFIED) ret = default_notify (this, event, data); return ret; |