summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.c
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/xlator.c')
-rw-r--r--libglusterfs/src/xlator.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 22a494d01a5..5c91380be15 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -762,6 +762,23 @@ out:
return;
}
+void
+loc_pargfid (loc_t *loc, uuid_t gfid)
+{
+ if (!gfid)
+ goto out;
+ gf_uuid_clear (gfid);
+
+ if (!loc)
+ goto out;
+ else if (!gf_uuid_is_null (loc->pargfid))
+ gf_uuid_copy (gfid, loc->pargfid);
+ else if (loc->parent && (!gf_uuid_is_null (loc->parent->gfid)))
+ gf_uuid_copy (gfid, loc->parent->gfid);
+out:
+ return;
+}
+
char*
loc_gfid_utoa (loc_t *loc)
{