summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.c
diff options
context:
space:
mode:
authorShreyas Siravara <sshreyas@fb.com>2017-08-08 12:09:25 +0530
committerAtin Mukherjee <amukherj@redhat.com>2017-10-10 07:15:00 +0000
commitd4eb4ef28073fc8f5430802d9de9344e551711bb (patch)
treefdf511eee235842e8a9f607c097f4c1ccc2b5367 /xlators/mgmt/glusterd/src/glusterd-utils.c
parent7a179f55c7e7f7ce32b9938f91c8706133340157 (diff)
gfproxy: Introduce new server-side daemon called GFProxy
Summmary: Adds a new server-side daemon called gfproxyd & a new FUSE client called gfproxy-client Updates: #242 BUG: 1428063 Change-Id: I83210098d3a381922bc64fed1110ae1b76e6519f Tested-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-by: Kevin Vigor <kvigor@fb.com> Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c39
1 files changed, 39 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index fd70516a289..623a3841f89 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -12516,6 +12516,45 @@ out:
}
void
+glusterd_get_gfproxy_client_volfile (glusterd_volinfo_t *volinfo,
+ char *path, int path_len)
+{
+ char workdir[PATH_MAX] = {0, };
+ glusterd_conf_t *priv = THIS->private;
+
+ GLUSTERD_GET_VOLUME_DIR (workdir, volinfo, priv);
+
+ switch (volinfo->transport_type) {
+ case GF_TRANSPORT_TCP:
+ snprintf (path, path_len,
+ "%s/trusted-%s.tcp-gfproxy-fuse.vol",
+ workdir, volinfo->volname);
+ break;
+
+ case GF_TRANSPORT_RDMA:
+ snprintf (path, path_len,
+ "%s/trusted-%s.rdma-gfproxy-fuse.vol",
+ workdir, volinfo->volname);
+ break;
+ default:
+ break;
+ }
+}
+
+void
+glusterd_get_gfproxyd_volfile (glusterd_volinfo_t *volinfo,
+ char *path, int path_len)
+{
+ char workdir[PATH_MAX] = {0, };
+ glusterd_conf_t *priv = THIS->private;
+
+ GLUSTERD_GET_VOLUME_DIR (workdir, volinfo, priv);
+
+ snprintf (path, path_len, "%s/%s.gfproxyd.vol", workdir,
+ volinfo->volname);
+}
+
+void
glusterd_get_rebalance_volfile (glusterd_volinfo_t *volinfo,
char *path, int path_len)
{