From 800258b54a4a776430410eb949cfded147c4ae8a Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Thu, 9 Jan 2014 16:55:11 +0530 Subject: cluster/afr: Prevent heal info hang when data-self-heal in progress. Problem: For determining whether data-self-heal is needed afr takes blocking locks. So if self-heal is indeed in progress on the file, this leads to hangs. heal info hung for almost 50 minutes when a 50G file is undergoing heal. Fix: When self-heal is in progress there is a live self-heal-domain lock. In this stage if a non-blocking inodelk for self-heal-domain lock is performed it will fail with EAGAIN. For heal info we can use this logic to determing that the file is possibly undergoing heal and inform it to user instead of waiting for the completion of self-heal. Change-Id: I18527c59e429602bae49c98ff45502833ab8e1f0 BUG: 1039544 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/7482 Tested-by: Gluster Build System Reviewed-by: Ravishankar N Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-self-heal-common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/cluster/afr/src/afr-self-heal-common.c') diff --git a/xlators/cluster/afr/src/afr-self-heal-common.c b/xlators/cluster/afr/src/afr-self-heal-common.c index 4916bf45d68..8861870372d 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -2360,6 +2360,7 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this) orig_frame_sh->entry_sh_pending = sh->entry_sh_pending; orig_frame_sh->data_sh_pending = sh->data_sh_pending; orig_frame_sh->metadata_sh_pending = sh->metadata_sh_pending; + orig_frame_sh->possibly_healing = sh->possibly_healing; sh->unwind (sh->orig_frame, this, sh->op_ret, sh->op_errno, is_self_heal_failed (sh, AFR_CHECK_ALL)); } -- cgit