summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-05-13 21:56:06 +0530
committerAnand Avati <avati@redhat.com>2012-05-14 14:45:46 -0700
commit9c17a68d77f58d6b471a2601070d17dee38546d8 (patch)
treecfa7926fb7dc9a385648b5c6482b01901ab83c68
parent8c4bf91025e2bf510a56f5789594beceb3c3827c (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/3323 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.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);