summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2012-03-02 15:34:51 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-02 07:11:33 -0800
commitf822d76d5a247ea6ba7375a35cb72b63fa413005 (patch)
tree1062aa12cd6a0ad7475624921b50c8593647c8b1 /xlators
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 <raghavendrabhat@gluster.com> Reviewed-on: http://review.gluster.com/2857 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c2
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 e3a8c51ad..1cd447e75 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;