From b9ae4b19da2898fa610d1bfd4b9e5829acabb121 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Mon, 22 Aug 2011 12:14:22 +0530 Subject: cluster/afr: Change definition of stale child The code is checking for priv->child_up[i], which can change while the fop is in progress. Since pending[child][id-of-transaction] alone is enough to tell if the child became stale or not, use just that. Change-Id: I494bf02cca66f4fd41526195fafce86a202c6bd1 BUG: 3455 Reviewed-on: http://review.gluster.com/293 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/cluster/afr/src/afr-transaction.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/cluster/afr/src/afr-transaction.c') diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c index 6b0e9a7cfe5..e9b8ee7dcdf 100644 --- a/xlators/cluster/afr/src/afr-transaction.c +++ b/xlators/cluster/afr/src/afr-transaction.c @@ -440,7 +440,7 @@ afr_transaction_rm_stale_children (call_frame_t *frame, xlator_t *this, if (!afr_is_child_present (fresh_children, priv->child_count, i)) continue; - if ((!priv->child_up[i]) || (pending[i][idx] == 0)) { + if (pending[i][idx] == 0) { /* child is down or op failed on it */ rm_stale_children = _gf_true; afr_children_rm_child (fresh_children, i, -- cgit