From d49e1257798f390cd894f0c4b23030ac5726c348 Mon Sep 17 00:00:00 2001 From: Pranith K Date: Wed, 13 Jul 2011 05:59:47 +0000 Subject: cluster/afr: save xattr of all the children in lookup_cbk Signed-off-by: Pranith Kumar K Signed-off-by: Anand Avati BUG: 3138 ([release-3.2]: ls shows 2 entries) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3138 --- xlators/cluster/afr/src/afr-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 2b24522f5..6733cb314 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -917,6 +917,7 @@ afr_fresh_lookup_cbk (call_frame_t *frame, void *cookie, } else { afr_lookup_self_heal_check (this, local, buf, lookup_buf); + local->cont.lookup.xattrs[child_index] = dict_ref (xattr); if (child_index == local->read_child_index) { /* lookup has succeeded on the read child. @@ -926,7 +927,6 @@ afr_fresh_lookup_cbk (call_frame_t *frame, void *cookie, dict_unref (local->cont.lookup.xattr); local->cont.lookup.xattr = dict_ref (xattr); - local->cont.lookup.xattrs[child_index] = dict_ref (xattr); local->cont.lookup.postparent = *postparent; *lookup_buf = *buf; @@ -1037,6 +1037,7 @@ afr_revalidate_lookup_cbk (call_frame_t *frame, void *cookie, } else { afr_lookup_self_heal_check (this, local, buf, lookup_buf); + local->cont.lookup.xattrs[child_index] = dict_ref (xattr); if (child_index == local->read_child_index) { /* @@ -1048,7 +1049,6 @@ afr_revalidate_lookup_cbk (call_frame_t *frame, void *cookie, dict_unref (local->cont.lookup.xattr); local->cont.lookup.xattr = dict_ref (xattr); - local->cont.lookup.xattrs[child_index] = dict_ref (xattr); local->cont.lookup.postparent = *postparent; *lookup_buf = *buf; -- cgit