From 9c17a68d77f58d6b471a2601070d17dee38546d8 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Sun, 13 May 2012 21:56:06 +0530 Subject: 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: http://review.gluster.com/3323 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Anand Avati --- xlators/features/marker/src/marker.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'xlators') 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); -- cgit