summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
diff options
context:
space:
mode:
authorAtin Mukherjee <amukherj@redhat.com>2015-06-23 15:40:32 +0530
committerVijay Bellur <vbellur@redhat.com>2015-06-24 17:27:32 -0700
commitb1ee65194c7e5c982235b8f3e00e0efb25cf353a (patch)
tree53f5c3e1a444da4aff801c6c3c7e74d8da751e4f /xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
parente4fcbc7b812a5f0d0fcf6f87d448fa94fd619afe (diff)
glusterd: use mkdir_p for creating rundir
Backport of http://review.gluster.org/11364 snapdsvc initialization is now dependent on all subsequent directories and volfile creations as per commit 2b9efc9. However this may not hold true correct for all the cases. While importing a volume we would need to start the service before the store creation. To avoid this dependency, use mkdir_p instead of mkdir to create rundir Change-Id: Ib251043398c40f1b76378e3bc6d0c36c1fe4cca3 BUG: 1235208 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/11364 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/11377 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c b/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
index 1a68afb56f2..04096a4a116 100644
--- a/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
+++ b/xlators/mgmt/glusterd/src/glusterd-svc-mgmt.c
@@ -23,7 +23,7 @@ glusterd_svc_create_rundir (char *rundir)
{
int ret = -1;
- ret = mkdir (rundir, 0777);
+ ret = mkdir_p (rundir, 0777, _gf_true);
if ((ret == -1) && (EEXIST != errno)) {
gf_msg (THIS->name, GF_LOG_ERROR, errno,
GD_MSG_CREATE_DIR_FAILED, "Unable to create rundir %s",