summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-handshake.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handshake.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c
index c7e419c5691..8c397325260 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handshake.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c
@@ -264,6 +264,50 @@ build_volfile_path (char *volume_id, char *path,
}
+ volid_ptr = strstr (volume_id, "gfproxy-client/");
+ if (volid_ptr) {
+ volid_ptr = strchr (volid_ptr, '/');
+ if (!volid_ptr) {
+ ret = -1;
+ goto out;
+ }
+ volid_ptr++;
+
+ ret = glusterd_volinfo_find (volid_ptr, &volinfo);
+ if (ret == -1) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Couldn't find volinfo");
+ goto out;
+ }
+
+ glusterd_get_gfproxy_client_volfile (volinfo, path, path_len);
+
+ ret = 0;
+ goto out;
+ }
+
+ volid_ptr = strstr (volume_id, "gfproxy/");
+ if (volid_ptr) {
+ volid_ptr = strchr (volid_ptr, '/');
+ if (!volid_ptr) {
+ ret = -1;
+ goto out;
+ }
+ volid_ptr++;
+
+ ret = glusterd_volinfo_find (volid_ptr, &volinfo);
+ if (ret == -1) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "Couldn't find volinfo");
+ goto out;
+ }
+
+ glusterd_get_gfproxyd_volfile (volinfo, path, path_len);
+
+ ret = 0;
+ goto out;
+ }
+
volid_ptr = strstr (volume_id, "/snaps/");
if (volid_ptr) {
ret = get_snap_volname_and_volinfo (volid_ptr, &volname,