diff options
author | Mohammed Rafi KC <rkavunga@redhat.com> | 2019-06-02 01:36:33 +0530 |
---|---|---|
committer | Pranith Kumar K <pkarampu@redhat.com> | 2019-06-08 17:50:10 +0530 |
commit | 4cfc5788af2488d173ac033850370c4f9ed7a05e (patch) | |
tree | 98a97731e3c76fca7c6f6c06dd2622fe3228adbe /xlators/cluster/ec/src/ec-types.h | |
parent | 9e0de2b634b888dd069e908b7745197d20fe7036 (diff) |
ec/fini: Fix race between xlator cleanup and on going async fop
Problem:
While we process a cleanup, there is a chance for a race between
async operations, for example ec_launch_replace_heal. So this can
lead to invalid mem access.
Solution:
Just like we track on going heal fops, we can also track fops like
ec_launch_replace_heal, so that we can decide when to send a
PARENT_DOWN request.
Change-Id: I055391c5c6c34d58aef7336847f3b570cb831298
fixes: bz#1703948
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Diffstat (limited to 'xlators/cluster/ec/src/ec-types.h')
-rw-r--r-- | xlators/cluster/ec/src/ec-types.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/cluster/ec/src/ec-types.h b/xlators/cluster/ec/src/ec-types.h index 1c295c08033..4dbf4a3a0aa 100644 --- a/xlators/cluster/ec/src/ec-types.h +++ b/xlators/cluster/ec/src/ec-types.h @@ -643,6 +643,7 @@ struct _ec { uintptr_t xl_notify; /* Bit flag representing notification for bricks. */ uintptr_t node_mask; + gf_atomic_t async_fop_count; /* Number of on going asynchronous fops. */ xlator_t **xl_list; gf_lock_t lock; gf_timer_t *timer; |