summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 223ee98d0a4..6f37338ee09 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -42,6 +42,7 @@
#include "glusterd-shd-svc.h"
#include "glusterd-nfs-svc.h"
#include "glusterd-bitd-svc.h"
+#include "glusterd-scrub-svc.h"
#include "glusterd-quotad-svc.h"
#include "glusterd-snapd-svc.h"
#include "common-utils.h"
@@ -1228,6 +1229,13 @@ glusterd_svc_init_all ()
}
gf_log (THIS->name, GF_LOG_DEBUG, "BitD service initialized");
+ ret = glusterd_scrubsvc_init (&(priv->scrub_svc));
+ if (ret) {
+ gf_log (THIS->name, GF_LOG_ERROR, "Failed to initialized scrub "
+ "service");
+ goto out;
+ }
+ gf_log (THIS->name, GF_LOG_DEBUG, "scrub service initialized");
out:
return ret;
@@ -1397,6 +1405,15 @@ init (xlator_t *this)
exit (1);
}
+ snprintf (storedir, PATH_MAX, "%s/scrub", workdir);
+ ret = mkdir (storedir, 0777);
+ if ((-1 == ret) && (errno != EEXIST)) {
+ gf_log (this->name, GF_LOG_CRITICAL,
+ "Unable to create scrub directory %s"
+ " ,errno = %d", storedir, errno);
+ exit (1);
+ }
+
snprintf (storedir, PATH_MAX, "%s/glustershd", workdir);
ret = mkdir (storedir, 0777);
if ((-1 == ret) && (errno != EEXIST)) {