summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh@redhat.com>2012-05-10 16:24:45 +0530
committerAnand Avati <avati@redhat.com>2012-05-22 00:53:12 -0700
commitfa287178ac714071ceacf8697bd36cc8a8a8da00 (patch)
tree684f2e2fc6527c8873f395704d5b799146383837 /xlators/mgmt/glusterd
parentbb2fc0a23e46413a14baef1846a9873681d32fe2 (diff)
core: canonicalize paths
canonicalize paths during add-brick, creation of volume, setting nfs.export-dir in volgen BUG: 789870 Change-Id: I1d3788ac850359b0def0457113831e825a475d58 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3315 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c4
2 files changed, 7 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 1b5a58dd73d..987244e7518 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -763,7 +763,10 @@ glusterd_brickinfo_from_brick (char *brick,
GF_ASSERT (path);
ret = glusterd_brickinfo_new (&new_brickinfo);
+ if (ret)
+ goto out;
+ ret = gf_canonicalize_path (path);
if (ret)
goto out;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 4e2a40cd08c..c8ff573b10b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -2686,6 +2686,10 @@ nfs_option_handler (volgen_graph_t *graph,
volinfo->volname);
if (ret != -1) {
+ ret = gf_canonicalize_path (vme->value);
+ if (ret)
+ return -1;
+
ret = xlator_set_option (xl, aa, vme->value);
GF_FREE (aa);
}