diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 20 |
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)) { |