summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/defaults-tmpl.c
diff options
context:
space:
mode:
authorMohit Agrawal <moagrawal@redhat.com>2018-10-02 08:54:28 +0530
committerRaghavendra G <rgowdapp@redhat.com>2018-10-08 15:45:47 +0000
commit5bc4594dabc08fd4de1940c044946e33037f2ac7 (patch)
treee3cd2c75a36c0a9da094818a5906ac40376be1d5 /libglusterfs/src/defaults-tmpl.c
parent31b6308c646a84c5064d2fb31dc45363a71b131a (diff)
core: glusterfsd keeping fd open in index xlator
Problem: Current resource cleanup sequence is not perfect while brick mux is enabled Solution: 1) Destroying xprt after cleanup all fd associated with a client 2) Before call fini for brick xlators ensure no stub should be running on a brick Change-Id: I86195785e428f57d3ef0da3e4061021fafacd435 fixes: bz#1631357 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'libglusterfs/src/defaults-tmpl.c')
-rw-r--r--libglusterfs/src/defaults-tmpl.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libglusterfs/src/defaults-tmpl.c b/libglusterfs/src/defaults-tmpl.c
index 2ce5ec7c685..bdb30d4872c 100644
--- a/libglusterfs/src/defaults-tmpl.c
+++ b/libglusterfs/src/defaults-tmpl.c
@@ -124,13 +124,18 @@ int
default_notify(xlator_t *this, int32_t event, void *data, ...)
{
GF_UNUSED int ret = 0;
+ xlator_t *victim = data;
+
switch (event) {
case GF_EVENT_PARENT_UP:
case GF_EVENT_PARENT_DOWN: {
xlator_list_t *list = this->children;
while (list) {
- xlator_notify(list->xlator, event, this);
+ if (victim && victim->cleanup_starting)
+ xlator_notify(list->xlator, event, victim);
+ else
+ xlator_notify(list->xlator, event, this);
list = list->next;
}
} break;