diff options
authorRaghavendra Bhat <>2012-03-02 15:34:51 +0530
committerVijay Bellur <>2012-03-02 07:11:33 -0800
commitf822d76d5a247ea6ba7375a35cb72b63fa413005 (patch)
parent71cffc0b66b849306778515d385083b9f78857f5 (diff)
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: Tested-by: Gluster Build System <> Reviewed-by: Amar Tumballi <> Reviewed-by: Pranith Kumar Karampuri <>
1 files changed, 2 insertions, 0 deletions
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;
return ret;