diff options
authorRaghavendra Bhat <>2012-05-13 21:56:06 +0530
committerVijay Bellur <>2012-05-23 02:10:24 -0700
commita87151dc3a34e24d6ba6d3f4b84d2c5feabff587 (patch)
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 <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Amar Tumballi <> Reviewed-by: Vijay Bellur <>
1 files changed, 6 insertions, 1 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index b2275944b..5890c0394 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);