diff options
author | Pranith Kumar K <pranithk@gluster.com> | 2011-11-07 16:13:42 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-11-18 04:20:57 -0800 |
commit | c5be0df9149155f9e23a8e9f24d0becb0543efe1 (patch) | |
tree | 5f310d2eb159a827a23b6e7defdce2d0f484dcd6 /xlators/cluster/afr/src/afr-common.c | |
parent | 3bc27345bf3aaf911960793ef4d48909f585bd84 (diff) |
cluster/afr: lookup should honor gfid present in loc
Change-Id: I2319258743e478cc3a932d8ff0b2204a97cd4f8e
BUG: 3760
Reviewed-on: http://review.gluster.com/680
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/cluster/afr/src/afr-common.c')
-rw-r--r-- | xlators/cluster/afr/src/afr-common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 25973e4eaf1..e25ff235324 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -138,10 +138,15 @@ out: } void -afr_lookup_save_gfid (uuid_t dst, void* new, inode_t *inode) +afr_lookup_save_gfid (uuid_t dst, void* new, const loc_t *loc) { + inode_t *inode = NULL; + + inode = loc->inode; if (inode && !uuid_is_null (inode->gfid)) { uuid_copy (dst, inode->gfid); + } else if (!uuid_is_null (loc->gfid)){ + uuid_copy (dst, loc->gfid); } else { GF_ASSERT (new && !uuid_is_null (new)); uuid_copy (dst, new); @@ -2016,7 +2021,7 @@ afr_lookup (call_frame_t *frame, xlator_t *this, goto out; } afr_lookup_save_gfid (local->cont.lookup.gfid_req, gfid_req, - loc->inode); + loc); local->fop = GF_FOP_LOOKUP; for (i = 0; i < priv->child_count; i++) { if (local->child_up[i]) { |