summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorKrishnan Parthasarathi <kp@gluster.com>2012-05-16 18:22:35 +0530
committerAnand Avati <avati@redhat.com>2012-05-21 13:46:18 -0700
commita2b7f11f279b9acc74c1a3b6d893fda7c160683d (patch)
tree756adc0753d6e6947a4e825068a5866aa91b406c /xlators/mgmt/glusterd/src/glusterd.c
parentcfcc252514f3c3e99a3f40ca3415f77c2295a8e0 (diff)
common-utils: Simplified mkdir_p interface and put it to use.
- Simplified mkdir_p interface. - Removed mkdir_if_missing from codebase - Modified glusterd consumers of mkdir_if_missing to use mkdir_p with allow_symlinks=_gf_true. This implicitly assumes that glusterd is in 'control' of the brick path and glusterd's working dir in the sense that the symlinks (if any) in any of the above mentioned paths are under the 'storage administrator's control. Change-Id: I7383ad5cff11b123e1e0d2fe6da0c81e03c52ed2 BUG: 823132 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3378 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index a2c59d0de15..58890985f96 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -344,7 +344,7 @@ glusterd_crt_georep_folders (char *georepdir, glusterd_conf_t *conf)
}
snprintf (georepdir, PATH_MAX, "%s/"GEOREP, conf->workdir);
- ret = mkdir_if_missing (georepdir, NULL);
+ ret = mkdir_p (georepdir, 0777, _gf_true);
if (-1 == ret) {
gf_log ("glusterd", GF_LOG_CRITICAL,
"Unable to create "GEOREP" directory %s",
@@ -359,7 +359,7 @@ glusterd_crt_georep_folders (char *georepdir, glusterd_conf_t *conf)
georepdir);
goto out;
}
- ret = mkdir_if_missing (DEFAULT_LOG_FILE_DIRECTORY"/"GEOREP, NULL);
+ ret = mkdir_p (DEFAULT_LOG_FILE_DIRECTORY"/"GEOREP, 0777, _gf_true);
if (-1 == ret) {
gf_log ("glusterd", GF_LOG_CRITICAL,
"Unable to create "GEOREP" log directory");
@@ -373,8 +373,8 @@ glusterd_crt_georep_folders (char *georepdir, glusterd_conf_t *conf)
georepdir);
goto out;
}
- ret = mkdir_if_missing (DEFAULT_LOG_FILE_DIRECTORY"/"GEOREP"-slaves",
- NULL);
+ ret = mkdir_p (DEFAULT_LOG_FILE_DIRECTORY"/"GEOREP"-slaves", 0777,
+ _gf_true);
if (-1 == ret) {
gf_log ("glusterd", GF_LOG_CRITICAL,
"Unable to create "GEOREP" slave log directory");