diff options
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 0b84a5075..896fbe03b 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -32,6 +32,7 @@ #include "glusterd-store.h" #include "run.h" #include "glusterd-volgen.h" +#include "glusterd-mgmt.h" #include "syscall.h" #include "cli1-xdr.h" @@ -345,7 +346,6 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req) dict_t *dict = NULL; gf_cli_req cli_req = {{0},}; glusterd_op_t cli_op = GD_OP_SNAP; - char operation[256] = {0,}; int type = 0; glusterd_conf_t *priv = NULL; char *host_uuid = NULL; @@ -406,20 +406,12 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req) switch (type) { case GF_SNAP_OPTION_TYPE_CREATE: - strncpy (operation, "create", sizeof (operation)); + ret = glusterd_mgmt_v3_initiate_all_phases (req, cli_op, dict); break; } - //ret = glusterd_op_begin_synctask (req, cli_op, dict); - out: - /* Temporary Will be removed by the glusterd syncop framework */ - ret = glusterd_op_send_cli_response (cli_op, ret, 0, req, - dict, err_str); - -/* Commenting out the code coz the syncop framework - should take care of this. if (ret) { if (err_str[0] == '\0') snprintf (err_str, sizeof (err_str), @@ -427,7 +419,7 @@ out: ret = glusterd_op_send_cli_response (cli_op, ret, 0, req, dict, err_str); } -*/ + return ret; } |