From f822d76d5a247ea6ba7375a35cb72b63fa413005 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Fri, 2 Mar 2012 15:34:51 +0530 Subject: cluster/afr: copy the parent's gfid from child loc while building parent loc Suppose the process is not a fuse or nfs mounted client, and some other process such as rebalance, then after lookups inode would not be linked to the inode table (since the inode was created for rebalance purpose only), thus keeping inode's gfid NULL. And afr while building the parent loc using child loc, does not copy the pargfid present in child'd loc structure. protocol/client will search for the gfid either in loc or in loc->inode and assert if it cannot find the gfid in either of them. Change-Id: I882e449fb8b79d5c69e4a942abcd844dc4d5d30c BUG: 799262 Signed-off-by: Raghavendra Bhat Reviewed-on: http://review.gluster.com/2857 Tested-by: Gluster Build System Reviewed-by: Amar Tumballi Reviewed-by: Pranith Kumar Karampuri --- xlators/cluster/afr/src/afr-dir-write.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xlators/cluster') diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c index e3a8c51ad5d..1cd447e750f 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -67,6 +67,8 @@ afr_build_parent_loc (loc_t *parent, loc_t *child, int32_t *op_errno) } parent->path = dirname (child_path); parent->inode = inode_ref (child->parent); + uuid_copy (parent->gfid, child->pargfid); + ret = 0; out: return ret; -- cgit