diff options
author | Mohit Agrawal <moagrawal@redhat.com> | 2019-07-16 20:36:57 +0530 |
---|---|---|
committer | Pranith Kumar Karampuri <pkarampu@redhat.com> | 2019-08-20 05:28:39 +0000 |
commit | f138d3fa2237e7fa940ecf17153fd700350c4138 (patch) | |
tree | 388452149858a9178c553c617d53fc0e6531ff2c /xlators/protocol | |
parent | a4d073cda22787552b46b186b898304b438db0c2 (diff) |
posix: In brick_mux brick is crashed while start/stop volume in loop
Problem: In brick_mux environment sometime brick is crashed while
volume stop/start in a loop.Brick is crashed in janitor task
at the time of accessing priv.If posix priv is cleaned up before
call janitor task then janitor task is crashed.
Solution: To avoid the crash in brick_mux environment introduce a new
flag janitor_task_stop in posix_private and before send CHILD_DOWN event
wait for update the flag by janitor_task_done
Change-Id: Id9fa5d183a463b2b682774ab5cb9868357d139a4
fixes: bz#1730409
Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
Diffstat (limited to 'xlators/protocol')
-rw-r--r-- | xlators/protocol/server/src/server.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 1e91ede0d58..74453edecd7 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -582,6 +582,7 @@ server_graph_janitor_threads(void *data) gf_boolean_t victim_found = _gf_false; xlator_list_t **trav_p = NULL; xlator_t *top = NULL; + uint32_t parent_down = 0; GF_ASSERT(data); @@ -600,7 +601,10 @@ server_graph_janitor_threads(void *data) victim = (*trav_p)->xlator; if (victim->cleanup_starting && strcmp(victim->name, victim_name) == 0) { - victim_found = _gf_true; + parent_down = victim->parent_down; + victim->parent_down = 1; + if (!parent_down) + victim_found = _gf_true; break; } } |