From f0eeffe7b658164fb060a9805aa6cc422aba213b Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Thu, 23 Dec 2010 04:08:43 +0000 Subject: afr_lookup_done: Propogate the same inode number as sent in first lookup If only one subvolume was up, we used to unwind, without updating the ino Signed-off-by: shishir gowda Signed-off-by: Anand V. Avati BUG: 2144 (errors removing directories when one subvolume is down) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2144 --- xlators/cluster/afr/src/afr-common.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index b9f369262..81f01c125 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -637,13 +637,6 @@ afr_lookup_done (call_frame_t *frame, xlator_t *this, struct iatt *lookup_buf) local->cont.lookup.buf.ia_ino = local->cont.lookup.ino; } - up_count = afr_up_children_count (priv->child_count, priv->child_up); - if (up_count == 1) { - gf_log (this->name, GF_LOG_DEBUG, - "Only 1 child up - do not attempt to detect self heal"); - goto unwind; - } - if (local->op_ret == 0) { /* KLUDGE: assuming DHT will not itransform in revalidate */ @@ -652,6 +645,13 @@ afr_lookup_done (call_frame_t *frame, xlator_t *this, struct iatt *lookup_buf) local->cont.lookup.inode->ino; } } + up_count = afr_up_children_count (priv->child_count, priv->child_up); + if (up_count == 1) { + gf_log (this->name, GF_LOG_DEBUG, + "Only 1 child up - do not attempt to detect self heal"); + + goto unwind; + } if (local->success_count && local->enoent_count) { local->self_heal.need_metadata_self_heal = _gf_true; -- cgit