summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorMohammed Rafi KC <rkavunga@redhat.com>2019-01-03 17:44:18 +0530
committerRavishankar N <ravishankar@redhat.com>2019-02-12 15:09:34 +0000
commit017721e5cad5b8a5b498a06e54098ea920d5bc96 (patch)
tree938161c6156838a99c925bed508ae2416dee0aed /libglusterfs
parentcccf41f254c601c249d064315592941375570f88 (diff)
afr/shd: Cleanup self heal daemon resources during afr fini
We were not properly cleaning self-heal daemon resources during afr fini. This patch will clean the same. Change-Id: I597860be6f781b195449e695d871b8667a418d5a updates: bz#1659708 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/syncop-utils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libglusterfs/src/syncop-utils.c b/libglusterfs/src/syncop-utils.c
index be03527496e..b842142a0b3 100644
--- a/libglusterfs/src/syncop-utils.c
+++ b/libglusterfs/src/syncop-utils.c
@@ -350,6 +350,11 @@ syncop_mt_dir_scan(call_frame_t *frame, xlator_t *subvol, loc_t *loc, int pid,
gf_boolean_t cond_init = _gf_false;
gf_boolean_t mut_init = _gf_false;
gf_dirent_t entries;
+ xlator_t *this = NULL;
+
+ if (frame) {
+ this = frame->this;
+ }
/*For this functionality to be implemented in general, we need
* synccond_t infra which doesn't block the executing thread. Until then
@@ -397,6 +402,9 @@ syncop_mt_dir_scan(call_frame_t *frame, xlator_t *subvol, loc_t *loc, int pid,
list_for_each_entry_safe(entry, tmp, &entries.list, list)
{
+ if (this && this->cleanup_starting)
+ goto out;
+
list_del_init(&entry->list);
if (!strcmp(entry->d_name, ".") || !strcmp(entry->d_name, "..")) {
gf_dirent_entry_free(entry);