summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorshishir gowda <sgowda@redhat.com>2013-10-10 13:45:31 +0530
committershishir gowda <sgowda@redhat.com>2013-11-15 12:30:00 +0530
commit82c14c1d4a1b26b52d9b0fb6f68db6abafa04fe0 (patch)
treefd59ea4095aeed672732f97f3f65c025c21fd82d /xlators/mgmt/glusterd/src/glusterd.c
parente87c5979ae1859dbe7c2fd17d94a6e9f51f4073a (diff)
mgmt/glusterd: Introduce snapshot infrastructure
API's for creating, adding, finding, removing snapshots and consistency groups are provided. Change-Id: Ic28da69a075b062aefdf14754c68259ca58bd427 Signed-off-by: shishir gowda <sgowda@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index e4c4caee4..c932800c3 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -36,6 +36,7 @@
#include "glusterd-store.h"
#include "glusterd-hooks.h"
#include "glusterd-utils.h"
+#include "glusterd-locks.h"
#include "common-utils.h"
#include "run.h"
@@ -48,6 +49,7 @@ extern struct rpcsvc_program gluster_cli_getspec_prog;
extern struct rpcsvc_program gluster_pmap_prog;
extern glusterd_op_info_t opinfo;
extern struct rpcsvc_program gd_svc_mgmt_prog;
+extern struct rpcsvc_program gd_svc_mgmt_v3_prog;
extern struct rpcsvc_program gd_svc_peer_prog;
extern struct rpcsvc_program gd_svc_cli_prog;
extern struct rpcsvc_program gd_svc_cli_prog_ro;
@@ -64,6 +66,7 @@ struct rpcsvc_program *gd_inet_programs[] = {
&gd_svc_peer_prog,
&gd_svc_cli_prog_ro,
&gd_svc_mgmt_prog,
+ &gd_svc_mgmt_v3_prog,
&gluster_pmap_prog,
&gluster_handshake_prog,
&glusterd_mgmt_hndsk_prog,
@@ -1262,6 +1265,8 @@ init (xlator_t *this)
INIT_LIST_HEAD (&conf->peers);
INIT_LIST_HEAD (&conf->volumes);
+ INIT_LIST_HEAD (&conf->snap_cg);
+
pthread_mutex_init (&conf->mutex, NULL);
conf->rpc = rpc;
conf->uds_rpc = uds_rpc;
@@ -1275,6 +1280,8 @@ init (xlator_t *this)
glusterd_friend_sm_init ();
glusterd_op_sm_init ();
glusterd_opinfo_init ();
+ glusterd_vol_lock_init ();
+ glusterd_txn_opinfo_init ();
ret = glusterd_sm_tr_log_init (&conf->op_sm_log,
glusterd_op_sm_state_name_get,
glusterd_op_sm_event_name_get,
@@ -1394,6 +1401,8 @@ fini (xlator_t *this)
if (conf->handle)
gf_store_handle_destroy (conf->handle);
glusterd_sm_tr_log_delete (&conf->op_sm_log);
+ glusterd_vol_lock_fini ();
+ glusterd_txn_opinfo_fini ();
GF_FREE (conf);
this->private = NULL;