diff options
Diffstat (limited to 'glusterfsd/src/glusterfsd-mgmt.c')
-rw-r--r-- | glusterfsd/src/glusterfsd-mgmt.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/glusterfsd/src/glusterfsd-mgmt.c b/glusterfsd/src/glusterfsd-mgmt.c index 071066bdbaa..f4445acf6dd 100644 --- a/glusterfsd/src/glusterfsd-mgmt.c +++ b/glusterfsd/src/glusterfsd-mgmt.c @@ -1124,75 +1124,6 @@ out: } int -glusterfs_handle_bd_op (rpcsvc_request_t *req) -{ - int32_t ret = -1; - gd1_mgmt_brick_op_req xlator_req = {0,}; - dict_t *input = NULL; - xlator_t *xlator = NULL; - xlator_t *any = NULL; - dict_t *output = NULL; - char *xname = NULL; - glusterfs_ctx_t *ctx = NULL; - glusterfs_graph_t *active = NULL; - xlator_t *this = NULL; - char *error = NULL; - - GF_ASSERT (req); - this = THIS; - GF_ASSERT (this); - - ret = xdr_to_generic (req->msg[0], &xlator_req, - (xdrproc_t)xdr_gd1_mgmt_brick_op_req); - if (ret < 0) { - /* failed to decode msg */ - req->rpc_err = GARBAGE_ARGS; - goto out; - } - - ctx = glusterfsd_ctx; - active = ctx->active; - any = active->first; - input = dict_new (); - ret = dict_unserialize (xlator_req.input.input_val, - xlator_req.input.input_len, - &input); - if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, - "failed to " - "unserialize req-buffer to dictionary"); - goto out; - } else { - input->extra_stdfree = xlator_req.input.input_val; - } - - /* FIXME, hardcoded */ - xlator = xlator_search_by_xl_type (any, "storage/bd_map"); - if (!xlator) { - gf_log (this->name, GF_LOG_ERROR, "xlator %s is not " - "loaded", xname); - goto out; - } - output = dict_new (); - XLATOR_NOTIFY (xlator, GF_EVENT_TRANSLATOR_OP, input, output); -out: - if (ret < 0) { - int retval; - retval = dict_get_str (output, "error", &error); - } - glusterfs_xlator_op_response_send (req, ret, error, output); - if (input) - dict_unref (input); - if (output) - dict_unref (output); - if (xlator_req.name) - /* malloced by xdr */ - free (xlator_req.name); - - return 0; -} - -int glusterfs_handle_rpc_msg (rpcsvc_request_t *req) { int ret = -1; @@ -1256,9 +1187,6 @@ rpcsvc_actor_t glusterfs_actors[] = { [GLUSTERD_BRICK_XLATOR_DEFRAG] = {"TRANSLATOR DEFRAG", GLUSTERD_BRICK_XLATOR_DEFRAG, glusterfs_handle_defrag, NULL, 0, DRC_NA}, [GLUSTERD_NODE_PROFILE] = {"NFS PROFILE", GLUSTERD_NODE_PROFILE, glusterfs_handle_nfs_profile, NULL, 0, DRC_NA}, [GLUSTERD_NODE_STATUS] = {"NFS STATUS", GLUSTERD_NODE_STATUS, glusterfs_handle_node_status, NULL, 0, DRC_NA}, -#ifdef HAVE_BD_XLATOR - [GLUSTERD_BRICK_BD_OP] = {"BD OP", GLUSTERD_BRICK_BD_OP, glusterfs_handle_bd_op, NULL, 0, DRC_NA} -#endif }; struct rpcsvc_program glusterfs_mop_prog = { |