From 1af420c700fbc49b65cf7faceb3270e81cd991ce Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Sat, 20 Aug 2011 15:48:27 +0530 Subject: cluster/afr: Perform self-heal without locking the whole file Change-Id: I206571c77f2d7b3c9f9d7bb82a936366fd99ce5c BUG: 3182 Reviewed-on: http://review.gluster.com/141 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-dir-read.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'xlators/cluster/afr/src/afr-dir-read.c') diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 645da2a6c..ec3639ff7 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -164,9 +164,6 @@ out: sh->need_entry_self_heal = _gf_true; sh->forced_merge = _gf_true; - sh->type = local->fd->inode->ia_type; - sh->background = _gf_false; - sh->unwind = afr_examine_dir_sh_unwind; afr_self_heal_type_str_get(&local->self_heal, sh_type_str, @@ -177,7 +174,9 @@ out: " forced merge option set", sh_type_str, local->loc.path); - afr_self_heal (frame, this, local->fd->inode); + afr_launch_self_heal (frame, this, local->fd->inode, + _gf_false, local->fd->inode->ia_type, + NULL, afr_examine_dir_sh_unwind); } else { afr_set_opendir_done (this, local->fd->inode); @@ -205,7 +204,7 @@ afr_examine_dir (call_frame_t *frame, xlator_t *this) sizeof (*local->cont.opendir.checksum), gf_afr_mt_int32_t); - call_count = afr_up_children_count (priv->child_count, local->child_up); + call_count = afr_up_children_count (local->child_up, priv->child_count); local->call_count = call_count; @@ -240,8 +239,8 @@ afr_opendir_cbk (call_frame_t *frame, void *cookie, priv = this->private; local = frame->local; - up_children_count = afr_up_children_count (priv->child_count, - local->child_up); + up_children_count = afr_up_children_count (local->child_up, + priv->child_count); LOCK (&frame->lock); { -- cgit