summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt
diff options
context:
space:
mode:
authorRajesh Joseph <rjoseph@redhat.com>2013-10-25 12:08:32 +0530
committershishir gowda <sgowda@redhat.com>2013-11-15 14:39:42 +0530
commit3a7644605bdd004348bbd8c0b797eaebbc10ae34 (patch)
treecef18a86922040bf076d604dadde92d53cb7b46b /xlators/mgmt
parent4e1c76a68f2208822c503a555206f21a3da52256 (diff)
Snapshot: Added new XDR types
Added new XDR types for all the snapshot command. Change-Id: I46c02ea8e9c81c7967a773386c4b77b5eb6d5075 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c39
1 files changed, 26 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 68591f264..c1094966b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2080,20 +2080,20 @@ out:
int32_t
glusterd_snapshot (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
{
- char *name = NULL;
- char *volname = NULL;
- glusterd_volinfo_t *volinfo = NULL;
- int64_t volume_count = 0;
- char volname_buf[PATH_MAX] = {0, };
- int i = 0;
- int snap_command = 0;
- xlator_t *this = NULL;
- int ret = -1;
- glusterd_snap_cg_t *cg = NULL;
- gf_boolean_t is_cg = _gf_false;
+ int ret = -1;
+ int i = 0;
+ int snap_command = 0;
+ int64_t volume_count = 0;
+ gf_boolean_t is_cg = _gf_false;
+ char *name = NULL;
+ char *volname = NULL;
+ char *tmp = NULL;
+ char volname_buf[PATH_MAX] = {0, };
+ xlator_t *this = NULL;
+ glusterd_volinfo_t *volinfo = NULL;
+ glusterd_snap_cg_t *cg = NULL;
+ glusterd_conf_t *priv = NULL;
uuid_t cg_id;
- glusterd_conf_t *priv = NULL;
- char *tmp = NULL;
this = THIS;
@@ -2188,6 +2188,7 @@ glusterd_snapshot (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
}
break;
}
+
default:
gf_log (this->name, GF_LOG_WARNING, "invalid snap command");
goto out;
@@ -2299,6 +2300,18 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req)
case GF_SNAP_OPTION_TYPE_LIST:
ret = glusterd_handle_snapshot_list (req, cli_op, dict);
break;
+ case GF_SNAP_OPTION_TYPE_RESTORE:
+ case GF_SNAP_OPTION_TYPE_DELETE:
+ case GF_SNAP_OPTION_TYPE_START:
+ case GF_SNAP_OPTION_TYPE_STOP:
+ case GF_SNAP_OPTION_TYPE_STATUS:
+ case GF_SNAP_OPTION_TYPE_CONFIG:
+ gf_log (this->name, GF_LOG_ERROR, "Operation (%d) not "
+ "supported ", type);
+
+ ret = -1; /* Failure */
+ break;
+
default:
gf_log (this->name, GF_LOG_ERROR, "Unkown snapshot request "
"type (%d)", type);