From 4cfc5788af2488d173ac033850370c4f9ed7a05e Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Sun, 2 Jun 2019 01:36:33 +0530 Subject: 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 --- xlators/cluster/ec/src/ec-types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/cluster/ec/src/ec-types.h') 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; -- cgit