summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
authorPranith Kumar K <pkarampu@redhat.com>2013-03-14 15:54:07 +0530
committerAnand Avati <avati@redhat.com>2013-04-03 15:22:32 -0700
commite80a04f7850144449a0d2fc4f9d40d0227f170cc (patch)
tree542a6c552963729fa421e189ac4898a18a198d86 /libglusterfs
parent0106fce7fed3dc8f38de3bf365182bdd782b5d9c (diff)
protocol/client: Print valid loc identifiers
Change-Id: I45f91105862a2484b8906a7a63b98ab4aaf80d05 BUG: 924643 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4683 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/xlator.c16
-rw-r--r--libglusterfs/src/xlator.h1
2 files changed, 16 insertions, 1 deletions
diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c
index 1be4c86b..348f48c4 100644
--- a/libglusterfs/src/xlator.c
+++ b/libglusterfs/src/xlator.c
@@ -637,6 +637,21 @@ out:
return ret;
}
+char*
+loc_gfid_utoa (loc_t *loc)
+{
+ uuid_t gfid={0};
+
+ if (!loc)
+ goto out;
+ else if (!uuid_is_null (loc->gfid))
+ uuid_copy (gfid, loc->gfid);
+ else if (loc->inode && (!uuid_is_null (loc->inode->gfid)))
+ uuid_copy (gfid, loc->inode->gfid);
+out:
+ return uuid_utoa (gfid);
+}
+
int
loc_copy (loc_t *dst, loc_t *src)
{
@@ -676,7 +691,6 @@ err:
return ret;
}
-
int
xlator_list_destroy (xlator_list_t *list)
{
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index bb32797c..071a4bdb 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -886,6 +886,7 @@ int loc_copy (loc_t *dst, loc_t *src);
#define loc_dup(src, dst) loc_copy(dst, src)
void loc_wipe (loc_t *loc);
int loc_path (loc_t *loc, const char *bname);
+char* loc_gfid_utoa (loc_t *loc);
int xlator_mem_acct_init (xlator_t *xl, int num_types);
int is_gf_log_command (xlator_t *trans, const char *name, char *value);
int glusterd_check_log_level (const char *value);