diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-08-20 15:48:27 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-08-20 06:42:55 -0700 |
commit | 1af420c700fbc49b65cf7faceb3270e81cd991ce (patch) | |
tree | ee0dcfe62b4965191424b3121a4dd126e81260b8 /xlators/cluster/afr/src/afr-dir-read.c | |
parent | 2ebacdfdd3c39bf2d3139cb7d811356758a2350a (diff) |
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 <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-dir-read.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-dir-read.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index 645da2a6c57..ec3639ff73b 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); { |