2018-10-29 20:23:51 +00:00
|
|
|
/*-
|
|
|
|
* BSD LICENSE
|
|
|
|
*
|
|
|
|
* Copyright (c) Intel Corporation.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* * Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in
|
|
|
|
* the documentation and/or other materials provided with the
|
|
|
|
* distribution.
|
|
|
|
* * Neither the name of Intel Corporation nor the names of its
|
|
|
|
* contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "vbdev_ocf.h"
|
2018-12-28 18:59:40 +00:00
|
|
|
#include "stats.h"
|
2018-10-29 20:23:51 +00:00
|
|
|
#include "spdk/log.h"
|
|
|
|
#include "spdk/rpc.h"
|
|
|
|
#include "spdk/string.h"
|
|
|
|
|
|
|
|
/* Structure to hold the parameters for this RPC method. */
|
2019-08-28 08:30:48 +00:00
|
|
|
struct rpc_bdev_ocf_create {
|
2018-10-29 20:23:51 +00:00
|
|
|
char *name; /* master vbdev */
|
|
|
|
char *mode; /* OCF mode (choose one) */
|
|
|
|
char *cache_bdev_name; /* sub bdev */
|
|
|
|
char *core_bdev_name; /* sub bdev */
|
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
2019-08-28 08:30:48 +00:00
|
|
|
free_rpc_bdev_ocf_create(struct rpc_bdev_ocf_create *r)
|
2018-10-29 20:23:51 +00:00
|
|
|
{
|
|
|
|
free(r->name);
|
|
|
|
free(r->core_bdev_name);
|
|
|
|
free(r->cache_bdev_name);
|
|
|
|
free(r->mode);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Structure to decode the input parameters for this RPC method. */
|
2019-08-28 08:30:48 +00:00
|
|
|
static const struct spdk_json_object_decoder rpc_bdev_ocf_create_decoders[] = {
|
|
|
|
{"name", offsetof(struct rpc_bdev_ocf_create, name), spdk_json_decode_string},
|
|
|
|
{"mode", offsetof(struct rpc_bdev_ocf_create, mode), spdk_json_decode_string},
|
|
|
|
{"cache_bdev_name", offsetof(struct rpc_bdev_ocf_create, cache_bdev_name), spdk_json_decode_string},
|
|
|
|
{"core_bdev_name", offsetof(struct rpc_bdev_ocf_create, core_bdev_name), spdk_json_decode_string},
|
2018-10-29 20:23:51 +00:00
|
|
|
};
|
|
|
|
|
2019-04-25 16:37:47 +00:00
|
|
|
static void
|
|
|
|
construct_cb(int status, struct vbdev_ocf *vbdev, void *cb_arg)
|
|
|
|
{
|
|
|
|
struct spdk_jsonrpc_request *request = cb_arg;
|
|
|
|
struct spdk_json_write_ctx *w;
|
|
|
|
|
|
|
|
if (status) {
|
|
|
|
spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
|
|
|
"Could not create OCF vbdev: %d",
|
|
|
|
status);
|
|
|
|
} else {
|
|
|
|
w = spdk_jsonrpc_begin_result(request);
|
2019-02-22 09:48:05 +00:00
|
|
|
spdk_json_write_string(w, vbdev->name);
|
|
|
|
spdk_jsonrpc_end_result(request, w);
|
2019-04-25 16:37:47 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-29 20:23:51 +00:00
|
|
|
static void
|
2019-08-28 08:30:48 +00:00
|
|
|
spdk_rpc_bdev_ocf_create(struct spdk_jsonrpc_request *request,
|
|
|
|
const struct spdk_json_val *params)
|
2018-10-29 20:23:51 +00:00
|
|
|
{
|
2019-08-28 08:30:48 +00:00
|
|
|
struct rpc_bdev_ocf_create req = {NULL};
|
2019-04-25 16:37:47 +00:00
|
|
|
int ret;
|
2018-10-29 20:23:51 +00:00
|
|
|
|
2019-08-28 08:30:48 +00:00
|
|
|
ret = spdk_json_decode_object(params, rpc_bdev_ocf_create_decoders,
|
|
|
|
SPDK_COUNTOF(rpc_bdev_ocf_create_decoders),
|
2018-10-29 20:23:51 +00:00
|
|
|
&req);
|
|
|
|
if (ret) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
"Invalid parameters");
|
2019-08-28 08:30:48 +00:00
|
|
|
free_rpc_bdev_ocf_create(&req);
|
2019-04-25 16:37:47 +00:00
|
|
|
return;
|
2018-10-29 20:23:51 +00:00
|
|
|
}
|
|
|
|
|
2019-05-22 19:20:20 +00:00
|
|
|
vbdev_ocf_construct(req.name, req.mode, req.cache_bdev_name, req.core_bdev_name, false,
|
2019-04-25 16:37:47 +00:00
|
|
|
construct_cb, request);
|
2019-08-28 08:30:48 +00:00
|
|
|
free_rpc_bdev_ocf_create(&req);
|
2018-10-29 20:23:51 +00:00
|
|
|
}
|
2019-08-28 08:30:48 +00:00
|
|
|
SPDK_RPC_REGISTER("bdev_ocf_create", spdk_rpc_bdev_ocf_create, SPDK_RPC_RUNTIME)
|
|
|
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_ocf_create, construct_ocf_bdev)
|
2018-10-29 20:23:51 +00:00
|
|
|
|
|
|
|
/* Structure to hold the parameters for this RPC method. */
|
2019-08-28 08:30:48 +00:00
|
|
|
struct rpc_bdev_ocf_delete {
|
2018-10-29 20:23:51 +00:00
|
|
|
char *name; /* master vbdev name */
|
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
2019-08-28 08:30:48 +00:00
|
|
|
free_rpc_bdev_ocf_delete(struct rpc_bdev_ocf_delete *r)
|
2018-10-29 20:23:51 +00:00
|
|
|
{
|
|
|
|
free(r->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Structure to decode the input parameters for this RPC method. */
|
2019-08-28 08:30:48 +00:00
|
|
|
static const struct spdk_json_object_decoder rpc_bdev_ocf_delete_decoders[] = {
|
|
|
|
{"name", offsetof(struct rpc_bdev_ocf_delete, name), spdk_json_decode_string},
|
2018-10-29 20:23:51 +00:00
|
|
|
};
|
|
|
|
|
2019-04-01 22:01:55 +00:00
|
|
|
static void
|
|
|
|
delete_cb(void *cb_arg, int status)
|
|
|
|
{
|
|
|
|
struct spdk_jsonrpc_request *request = cb_arg;
|
|
|
|
struct spdk_json_write_ctx *w;
|
|
|
|
|
|
|
|
if (status) {
|
|
|
|
spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
|
|
|
"Could not delete OCF vbdev: %d",
|
|
|
|
status);
|
|
|
|
} else {
|
|
|
|
w = spdk_jsonrpc_begin_result(request);
|
2019-02-22 09:48:05 +00:00
|
|
|
spdk_json_write_bool(w, true);
|
|
|
|
spdk_jsonrpc_end_result(request, w);
|
2019-04-01 22:01:55 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-10-29 20:23:51 +00:00
|
|
|
static void
|
2019-08-28 08:30:48 +00:00
|
|
|
spdk_rpc_bdev_ocf_delete(struct spdk_jsonrpc_request *request,
|
2018-10-29 20:23:51 +00:00
|
|
|
const struct spdk_json_val *params)
|
|
|
|
{
|
2019-08-28 08:30:48 +00:00
|
|
|
struct rpc_bdev_ocf_delete req = {NULL};
|
2018-10-29 20:23:51 +00:00
|
|
|
struct vbdev_ocf *vbdev;
|
|
|
|
int status;
|
|
|
|
|
2019-08-28 08:30:48 +00:00
|
|
|
status = spdk_json_decode_object(params, rpc_bdev_ocf_delete_decoders,
|
|
|
|
SPDK_COUNTOF(rpc_bdev_ocf_delete_decoders),
|
2018-10-29 20:23:51 +00:00
|
|
|
&req);
|
|
|
|
if (status) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
"Invalid parameters");
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
vbdev = vbdev_ocf_get_by_name(req.name);
|
|
|
|
if (vbdev == NULL) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
spdk_strerror(ENODEV));
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
2019-10-04 14:15:23 +00:00
|
|
|
status = vbdev_ocf_delete_clean(vbdev, delete_cb, request);
|
2018-10-29 20:23:51 +00:00
|
|
|
if (status) {
|
|
|
|
spdk_jsonrpc_send_error_response_fmt(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
|
|
|
"Could not delete OCF vbdev: %s",
|
|
|
|
spdk_strerror(-status));
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
end:
|
2019-08-28 08:30:48 +00:00
|
|
|
free_rpc_bdev_ocf_delete(&req);
|
2018-10-29 20:23:51 +00:00
|
|
|
}
|
2019-08-28 08:30:48 +00:00
|
|
|
SPDK_RPC_REGISTER("bdev_ocf_delete", spdk_rpc_bdev_ocf_delete, SPDK_RPC_RUNTIME)
|
|
|
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_ocf_delete, delete_ocf_bdev)
|
2018-12-28 18:59:40 +00:00
|
|
|
|
|
|
|
/* Structure to hold the parameters for this RPC method. */
|
2019-08-28 08:43:22 +00:00
|
|
|
struct rpc_bdev_ocf_get_stats {
|
2018-12-28 18:59:40 +00:00
|
|
|
char *name; /* master vbdev name */
|
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
2019-08-28 08:43:22 +00:00
|
|
|
free_rpc_bdev_ocf_get_stats(struct rpc_bdev_ocf_get_stats *r)
|
2018-12-28 18:59:40 +00:00
|
|
|
{
|
|
|
|
free(r->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Structure to decode the input parameters for this RPC method. */
|
2019-08-28 08:43:22 +00:00
|
|
|
static const struct spdk_json_object_decoder rpc_bdev_ocf_get_stats_decoders[] = {
|
|
|
|
{"name", offsetof(struct rpc_bdev_ocf_get_stats, name), spdk_json_decode_string},
|
2018-12-28 18:59:40 +00:00
|
|
|
};
|
|
|
|
|
2019-10-21 12:58:26 +00:00
|
|
|
struct get_ocf_stats_ctx {
|
|
|
|
struct spdk_jsonrpc_request *request;
|
|
|
|
int core_id;
|
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
|
|
|
spdk_rpc_bdev_ocf_get_stats_cmpl(ocf_cache_t cache, void *priv, int error)
|
|
|
|
{
|
|
|
|
struct get_ocf_stats_ctx *ctx = (struct get_ocf_stats_ctx *) priv;
|
|
|
|
struct spdk_json_write_ctx *w;
|
|
|
|
struct vbdev_ocf_stats stats;
|
|
|
|
|
|
|
|
if (error) {
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
error = vbdev_ocf_stats_get(cache, ctx->core_id, &stats);
|
|
|
|
|
|
|
|
ocf_mngt_cache_read_unlock(cache);
|
|
|
|
|
|
|
|
if (error) {
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
w = spdk_jsonrpc_begin_result(ctx->request);
|
|
|
|
vbdev_ocf_stats_write_json(w, &stats);
|
|
|
|
spdk_jsonrpc_end_result(ctx->request, w);
|
|
|
|
|
|
|
|
end:
|
|
|
|
if (error) {
|
|
|
|
spdk_jsonrpc_send_error_response_fmt(ctx->request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
|
|
|
"Could not get stats: %s",
|
|
|
|
spdk_strerror(-error));
|
|
|
|
}
|
|
|
|
free(ctx);
|
|
|
|
}
|
|
|
|
|
2018-12-28 18:59:40 +00:00
|
|
|
static void
|
2019-08-28 08:43:22 +00:00
|
|
|
spdk_rpc_bdev_ocf_get_stats(struct spdk_jsonrpc_request *request,
|
|
|
|
const struct spdk_json_val *params)
|
2018-12-28 18:59:40 +00:00
|
|
|
{
|
2019-08-28 08:43:22 +00:00
|
|
|
struct rpc_bdev_ocf_get_stats req = {NULL};
|
2018-12-28 18:59:40 +00:00
|
|
|
struct vbdev_ocf *vbdev;
|
2019-10-21 12:58:26 +00:00
|
|
|
struct get_ocf_stats_ctx *ctx;
|
|
|
|
|
|
|
|
ctx = calloc(1, sizeof(*ctx));
|
|
|
|
if (!ctx) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
"Not enough memory to process request");
|
|
|
|
goto end;
|
|
|
|
}
|
2018-12-28 18:59:40 +00:00
|
|
|
|
2019-08-28 08:43:22 +00:00
|
|
|
if (spdk_json_decode_object(params, rpc_bdev_ocf_get_stats_decoders,
|
|
|
|
SPDK_COUNTOF(rpc_bdev_ocf_get_stats_decoders),
|
2018-12-28 18:59:40 +00:00
|
|
|
&req)) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
"Invalid parameters");
|
2019-10-21 12:58:26 +00:00
|
|
|
free(ctx);
|
2018-12-28 18:59:40 +00:00
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
vbdev = vbdev_ocf_get_by_name(req.name);
|
|
|
|
if (vbdev == NULL) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
spdk_strerror(ENODEV));
|
2019-10-21 12:58:26 +00:00
|
|
|
free(ctx);
|
2018-12-28 18:59:40 +00:00
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
2019-10-21 12:58:26 +00:00
|
|
|
ctx->core_id = vbdev->core.id;
|
|
|
|
ctx->request = request;
|
|
|
|
ocf_mngt_cache_read_lock(vbdev->ocf_cache, spdk_rpc_bdev_ocf_get_stats_cmpl, ctx);
|
2018-12-28 18:59:40 +00:00
|
|
|
|
|
|
|
end:
|
2019-08-28 08:43:22 +00:00
|
|
|
free_rpc_bdev_ocf_get_stats(&req);
|
2018-12-28 18:59:40 +00:00
|
|
|
}
|
2019-08-28 08:43:22 +00:00
|
|
|
SPDK_RPC_REGISTER("bdev_ocf_get_stats", spdk_rpc_bdev_ocf_get_stats, SPDK_RPC_RUNTIME)
|
|
|
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_ocf_get_stats, get_ocf_stats)
|
2019-01-22 21:11:37 +00:00
|
|
|
|
2019-03-11 17:16:32 +00:00
|
|
|
/* Structure to hold the parameters for this RPC method. */
|
2019-08-28 08:43:22 +00:00
|
|
|
struct rpc_bdev_ocf_get_bdevs {
|
2019-03-11 17:16:32 +00:00
|
|
|
char *name;
|
|
|
|
};
|
|
|
|
|
|
|
|
static void
|
2019-08-28 08:43:22 +00:00
|
|
|
free_rpc_bdev_ocf_get_bdevs(struct rpc_bdev_ocf_get_bdevs *r)
|
2019-03-11 17:16:32 +00:00
|
|
|
{
|
|
|
|
free(r->name);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Structure to decode the input parameters for this RPC method. */
|
2019-08-28 08:43:22 +00:00
|
|
|
static const struct spdk_json_object_decoder rpc_bdev_ocf_get_bdevs_decoders[] = {
|
|
|
|
{"name", offsetof(struct rpc_bdev_ocf_get_bdevs, name), spdk_json_decode_string, true},
|
2019-03-11 17:16:32 +00:00
|
|
|
};
|
|
|
|
|
2019-09-11 09:29:55 +00:00
|
|
|
struct bdev_get_bdevs_ctx {
|
2019-03-11 17:16:32 +00:00
|
|
|
char *name;
|
|
|
|
struct spdk_json_write_ctx *w;
|
|
|
|
};
|
|
|
|
|
2019-01-22 21:11:37 +00:00
|
|
|
static void
|
2019-09-11 09:29:55 +00:00
|
|
|
bdev_get_bdevs_fn(struct vbdev_ocf *vbdev, void *ctx)
|
2019-01-22 21:11:37 +00:00
|
|
|
{
|
2019-09-11 09:29:55 +00:00
|
|
|
struct bdev_get_bdevs_ctx *cctx = ctx;
|
2019-03-11 17:16:32 +00:00
|
|
|
struct spdk_json_write_ctx *w = cctx->w;
|
|
|
|
|
|
|
|
if (cctx->name != NULL &&
|
|
|
|
strcmp(vbdev->name, cctx->name) &&
|
|
|
|
strcmp(vbdev->cache.name, cctx->name) &&
|
|
|
|
strcmp(vbdev->core.name, cctx->name)) {
|
|
|
|
return;
|
|
|
|
}
|
2019-01-22 21:11:37 +00:00
|
|
|
|
|
|
|
spdk_json_write_object_begin(w);
|
|
|
|
spdk_json_write_named_string(w, "name", vbdev->name);
|
|
|
|
spdk_json_write_named_bool(w, "started", vbdev->state.started);
|
|
|
|
|
|
|
|
spdk_json_write_named_object_begin(w, "cache");
|
|
|
|
spdk_json_write_named_string(w, "name", vbdev->cache.name);
|
|
|
|
spdk_json_write_named_bool(w, "attached", vbdev->cache.attached);
|
|
|
|
spdk_json_write_object_end(w);
|
|
|
|
|
|
|
|
spdk_json_write_named_object_begin(w, "core");
|
|
|
|
spdk_json_write_named_string(w, "name", vbdev->core.name);
|
|
|
|
spdk_json_write_named_bool(w, "attached", vbdev->core.attached);
|
|
|
|
spdk_json_write_object_end(w);
|
|
|
|
|
|
|
|
spdk_json_write_object_end(w);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2019-08-28 08:43:22 +00:00
|
|
|
spdk_rpc_bdev_ocf_get_bdevs(struct spdk_jsonrpc_request *request,
|
|
|
|
const struct spdk_json_val *params)
|
2019-01-22 21:11:37 +00:00
|
|
|
{
|
|
|
|
struct spdk_json_write_ctx *w;
|
2019-08-28 08:43:22 +00:00
|
|
|
struct rpc_bdev_ocf_get_bdevs req = {NULL};
|
2019-09-11 09:29:55 +00:00
|
|
|
struct bdev_get_bdevs_ctx cctx;
|
2019-03-11 17:16:32 +00:00
|
|
|
|
2019-08-28 08:43:22 +00:00
|
|
|
if (params && spdk_json_decode_object(params, rpc_bdev_ocf_get_bdevs_decoders,
|
|
|
|
SPDK_COUNTOF(rpc_bdev_ocf_get_bdevs_decoders),
|
2019-03-11 17:16:32 +00:00
|
|
|
&req)) {
|
|
|
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
"Invalid parameters");
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (req.name) {
|
|
|
|
if (!(vbdev_ocf_get_by_name(req.name) || vbdev_ocf_get_base_by_name(req.name))) {
|
|
|
|
spdk_jsonrpc_send_error_response(request,
|
|
|
|
SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
|
|
|
spdk_strerror(ENODEV));
|
|
|
|
goto end;
|
|
|
|
}
|
|
|
|
}
|
2019-01-22 21:11:37 +00:00
|
|
|
|
|
|
|
w = spdk_jsonrpc_begin_result(request);
|
|
|
|
|
2019-03-11 17:16:32 +00:00
|
|
|
cctx.name = req.name;
|
|
|
|
cctx.w = w;
|
|
|
|
|
2019-01-22 21:11:37 +00:00
|
|
|
spdk_json_write_array_begin(w);
|
2019-09-11 09:29:55 +00:00
|
|
|
vbdev_ocf_foreach(bdev_get_bdevs_fn, &cctx);
|
2019-01-22 21:11:37 +00:00
|
|
|
spdk_json_write_array_end(w);
|
|
|
|
spdk_jsonrpc_end_result(request, w);
|
2019-03-11 17:16:32 +00:00
|
|
|
|
|
|
|
end:
|
2019-08-28 08:43:22 +00:00
|
|
|
free_rpc_bdev_ocf_get_bdevs(&req);
|
2019-01-22 21:11:37 +00:00
|
|
|
}
|
2019-08-28 08:43:22 +00:00
|
|
|
SPDK_RPC_REGISTER("bdev_ocf_get_bdevs", spdk_rpc_bdev_ocf_get_bdevs, SPDK_RPC_RUNTIME)
|
|
|
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_ocf_get_bdevs, get_ocf_bdevs)
|