From a0695e0524cc61d05156b66ebe3542870712daae Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 7 Sep 2011 13:50:19 +0530 Subject: cluster/afr: perform self-heal with least priority Change-Id: Id8a1dffa3c3200234ad154d1749278a2d7c7021b BUG: 3502 Reviewed-on: http://review.gluster.com/336 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/cluster/afr/src/afr-self-heal-common.c | 7 +++++++ 1 file changed, 7 insertions(+) (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 489a5bf446..eeca62724b 100644 --- a/xlators/cluster/afr/src/afr-self-heal-common.c +++ b/xlators/cluster/afr/src/afr-self-heal-common.c @@ -2031,6 +2031,12 @@ afr_self_heal_completion_cbk (call_frame_t *bgsh_frame, xlator_t *this) return 0; } +static inline void +afr_set_low_priority (call_frame_t *frame) +{ + frame->root->pid = -1; +} + int afr_self_heal (call_frame_t *frame, xlator_t *this, inode_t *inode) { @@ -2071,6 +2077,7 @@ afr_self_heal (call_frame_t *frame, xlator_t *this, inode_t *inode) sh_frame = copy_frame (frame); afr_set_lk_owner (sh_frame, this); + afr_set_low_priority (sh_frame); sh_local = afr_local_copy (local, this); sh_frame->local = sh_local; -- cgit