summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorVenky Shankar <vshankar@redhat.com>2015-01-07 11:14:31 +0530
committerVijay Bellur <vbellur@redhat.com>2015-03-24 07:56:32 -0700
commit84db9f8271f150fbb6024186f7f681e941731280 (patch)
treec9a3fe9dceeac5f00714362af4c7f6c706b539b2 /xlators/mgmt/glusterd/src/glusterd.c
parenta37f3ca2b286732fff18f0b0897d8bb1713c89b7 (diff)
mgmt/glusterd: generate volfile for BitD
* Implement the skeleton of bit-rot xlator. Original-Author: Raghavendra Bhat <raghavendra@redhat.com> Signed-off-by: Venky Shankar <vshankar@redhat.com> Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Signed-off-by: Anand Nekkunti <anekkunt@redhat.com> Change-Id: If33218bdc694f5f09cb7b8097c4fdb74d7a23b2d BUG: 1170075 Reviewed-on: http://review.gluster.org/9710 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 979ae7ab328..223ee98d0a4 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -41,6 +41,7 @@
#include "glusterd-svc-mgmt.h"
#include "glusterd-shd-svc.h"
#include "glusterd-nfs-svc.h"
+#include "glusterd-bitd-svc.h"
#include "glusterd-quotad-svc.h"
#include "glusterd-snapd-svc.h"
#include "common-utils.h"
@@ -1218,6 +1219,16 @@ glusterd_svc_init_all ()
}
gf_log (THIS->name, GF_LOG_DEBUG, "quotad service initialized");
+ /* Init BitD svc */
+ ret = glusterd_bitdsvc_init (&(priv->bitd_svc));
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to initialized BitD "
+ "service");
+ goto out;
+ }
+ gf_log (THIS->name, GF_LOG_DEBUG, "BitD service initialized");
+
+
out:
return ret;
}
@@ -1377,6 +1388,15 @@ init (xlator_t *this)
exit (1);
}
+ snprintf (storedir, PATH_MAX, "%s/bitd", workdir);
+ ret = mkdir (storedir, 0777);
+ if ((-1 == ret) && (errno != EEXIST)) {
+ gf_log (this->name, GF_LOG_CRITICAL,
+ "Unable to create bitrot directory %s"
+ " ,errno = %d", storedir, errno);
+ exit (1);
+ }
+
snprintf (storedir, PATH_MAX, "%s/glustershd", workdir);
ret = mkdir (storedir, 0777);
if ((-1 == ret) && (errno != EEXIST)) {