summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-05-13 21:56:06 +0530
committerVijay Bellur <vijay@gluster.com>2012-05-23 02:10:24 -0700
commita87151dc3a34e24d6ba6d3f4b84d2c5feabff587 (patch)
treee7c90b25de764493df9c2c888eed6403d5daa94a
parent065703939125c2c4be88c400cc9c6690acdd5f93 (diff)
features/marker: use the gfid from the stat structure instead of inode
in fresh lookup, the inode would not have linked to the inode table until the fop reaches back to protocol/server, thus it would not contain the gfid within it (gfid would still be null). So use the stat structure to get the gfid in lookup callback instead of inode's gfid. Change-Id: Id70277f0228f3db64b05d613108cfb4f070197e6 BUG: 791087 Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/3400 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
-rw-r--r--xlators/features/marker/src/marker.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index b2275944b31..5890c03948a 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -2204,8 +2204,13 @@ marker_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
frame->local = NULL;
+ /* copy the gfid from the stat structure instead of inode,
+ * since if the lookup is fresh lookup, then the inode
+ * would have not yet linked to the inode table which happens
+ * in protocol/server.
+ */
if (!op_ret && local && uuid_is_null (local->loc.gfid))
- uuid_copy (local->loc.gfid, inode->gfid);
+ uuid_copy (local->loc.gfid, buf->ia_gfid);
STACK_UNWIND_STRICT (lookup, frame, op_ret, op_errno, inode, buf,
dict, postparent);