diff options
author | Varun Shastry <vshastry@redhat.com> | 2014-05-06 12:39:20 +0000 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-06-03 00:08:29 -0700 |
commit | 0fe5ab5b9215b8f0ecfb8bc4ba15a5370850654a (patch) | |
tree | 713e00bd047e1703848a0e8529b5592e35638101 /xlators/mgmt/glusterd/src/glusterd-handshake.c | |
parent | 15f7b4de1124a37a53c7ddb5635b005322b23025 (diff) |
glusterd: Changes to provide interface for USS
The changes which consists of the translators for the USS (User Servicable
Snapshots) is submitted as a separate patch. Current patch provides the
CLI access to the feature.
Change-Id: I6b98a42fcfa82f0870d8048fe0bb53141565e9c6
BUG: 1094815
Signed-off-by: Varun Shastry <vshastry@redhat.com>
Reviewed-on: http://review.gluster.org/7705
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-handshake.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-handshake.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-handshake.c b/xlators/mgmt/glusterd/src/glusterd-handshake.c index 2901b98d847..115dd8bd145 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handshake.c +++ b/xlators/mgmt/glusterd/src/glusterd-handshake.c @@ -162,6 +162,7 @@ build_volfile_path (const char *volname, char *path, const char *volname_ptr = NULL; char path_prefix [PATH_MAX] = {0,}; xlator_t *this = NULL; + char *volname_tmp = NULL; this = THIS; GF_ASSERT (this); @@ -170,7 +171,18 @@ build_volfile_path (const char *volname, char *path, GF_ASSERT (volname); GF_ASSERT (path); - if (strstr (volname, "gluster/")) { + if (strstr (volname, "snapd/")) { + volname_tmp = strchr (volname, '/') + 1; + ret = glusterd_volinfo_find (volname_tmp, &volinfo); + if (ret == -1) { + gf_log (this->name, GF_LOG_ERROR, + "Couldn't find volinfo"); + goto out; + } + glusterd_get_snapd_volfile (volinfo, path, path_len); + ret = 1; + goto out; + } else if (strstr (volname, "gluster/")) { server = strchr (volname, '/') + 1; glusterd_get_nodesvc_volfile (server, priv->workdir, path, path_len); |