module/bdev_compress: remove spdk prefix from static functions.
Signed-off-by: Seth Howell <seth.howell@intel.com> Change-Id: I7d3fd307a89592ed854e6d63852b895d44984644 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/2319 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Mellanox Build Bot Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
0668d53b3b
commit
347499e732
@ -405,7 +405,7 @@ error_create_mbuf:
|
|||||||
|
|
||||||
/* for completing rw requests on the orig IO thread. */
|
/* for completing rw requests on the orig IO thread. */
|
||||||
static void
|
static void
|
||||||
_spdk_reduce_rw_blocks_cb(void *arg)
|
_reduce_rw_blocks_cb(void *arg)
|
||||||
{
|
{
|
||||||
struct comp_bdev_io *io_ctx = arg;
|
struct comp_bdev_io *io_ctx = arg;
|
||||||
|
|
||||||
@ -419,7 +419,7 @@ _spdk_reduce_rw_blocks_cb(void *arg)
|
|||||||
|
|
||||||
/* Completion callback for r/w that were issued via reducelib. */
|
/* Completion callback for r/w that were issued via reducelib. */
|
||||||
static void
|
static void
|
||||||
spdk_reduce_rw_blocks_cb(void *arg, int reduce_errno)
|
reduce_rw_blocks_cb(void *arg, int reduce_errno)
|
||||||
{
|
{
|
||||||
struct spdk_bdev_io *bdev_io = arg;
|
struct spdk_bdev_io *bdev_io = arg;
|
||||||
struct comp_bdev_io *io_ctx = (struct comp_bdev_io *)bdev_io->driver_ctx;
|
struct comp_bdev_io *io_ctx = (struct comp_bdev_io *)bdev_io->driver_ctx;
|
||||||
@ -434,9 +434,9 @@ spdk_reduce_rw_blocks_cb(void *arg, int reduce_errno)
|
|||||||
/* Send this request to the orig IO thread. */
|
/* Send this request to the orig IO thread. */
|
||||||
orig_thread = spdk_io_channel_get_thread(ch);
|
orig_thread = spdk_io_channel_get_thread(ch);
|
||||||
if (orig_thread != spdk_get_thread()) {
|
if (orig_thread != spdk_get_thread()) {
|
||||||
spdk_thread_send_msg(orig_thread, _spdk_reduce_rw_blocks_cb, io_ctx);
|
spdk_thread_send_msg(orig_thread, _reduce_rw_blocks_cb, io_ctx);
|
||||||
} else {
|
} else {
|
||||||
_spdk_reduce_rw_blocks_cb(io_ctx);
|
_reduce_rw_blocks_cb(io_ctx);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -749,7 +749,7 @@ comp_read_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io, b
|
|||||||
|
|
||||||
spdk_reduce_vol_readv(comp_bdev->vol, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
|
spdk_reduce_vol_readv(comp_bdev->vol, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
|
||||||
bdev_io->u.bdev.offset_blocks, bdev_io->u.bdev.num_blocks,
|
bdev_io->u.bdev.offset_blocks, bdev_io->u.bdev.num_blocks,
|
||||||
spdk_reduce_rw_blocks_cb, bdev_io);
|
reduce_rw_blocks_cb, bdev_io);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* scheduled for completion on IO thread */
|
/* scheduled for completion on IO thread */
|
||||||
@ -784,7 +784,7 @@ _comp_bdev_io_submit(void *arg)
|
|||||||
case SPDK_BDEV_IO_TYPE_WRITE:
|
case SPDK_BDEV_IO_TYPE_WRITE:
|
||||||
spdk_reduce_vol_writev(comp_bdev->vol, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
|
spdk_reduce_vol_writev(comp_bdev->vol, bdev_io->u.bdev.iovs, bdev_io->u.bdev.iovcnt,
|
||||||
bdev_io->u.bdev.offset_blocks, bdev_io->u.bdev.num_blocks,
|
bdev_io->u.bdev.offset_blocks, bdev_io->u.bdev.num_blocks,
|
||||||
spdk_reduce_rw_blocks_cb, bdev_io);
|
reduce_rw_blocks_cb, bdev_io);
|
||||||
return;
|
return;
|
||||||
/* TODO in future patch in the series */
|
/* TODO in future patch in the series */
|
||||||
case SPDK_BDEV_IO_TYPE_RESET:
|
case SPDK_BDEV_IO_TYPE_RESET:
|
||||||
|
@ -52,7 +52,7 @@ static const struct spdk_json_object_decoder rpc_bdev_compress_get_orphans_decod
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_rpc_bdev_compress_get_orphans(struct spdk_jsonrpc_request *request,
|
rpc_bdev_compress_get_orphans(struct spdk_jsonrpc_request *request,
|
||||||
const struct spdk_json_val *params)
|
const struct spdk_json_val *params)
|
||||||
{
|
{
|
||||||
struct rpc_bdev_compress_get_orphans req = {};
|
struct rpc_bdev_compress_get_orphans req = {};
|
||||||
@ -96,7 +96,7 @@ spdk_rpc_bdev_compress_get_orphans(struct spdk_jsonrpc_request *request,
|
|||||||
spdk_jsonrpc_end_result(request, w);
|
spdk_jsonrpc_end_result(request, w);
|
||||||
free_rpc_bdev_compress_get_orphans(&req);
|
free_rpc_bdev_compress_get_orphans(&req);
|
||||||
}
|
}
|
||||||
SPDK_RPC_REGISTER("bdev_compress_get_orphans", spdk_rpc_bdev_compress_get_orphans, SPDK_RPC_RUNTIME)
|
SPDK_RPC_REGISTER("bdev_compress_get_orphans", rpc_bdev_compress_get_orphans, SPDK_RPC_RUNTIME)
|
||||||
|
|
||||||
struct rpc_compress_set_pmd {
|
struct rpc_compress_set_pmd {
|
||||||
enum compress_pmd pmd;
|
enum compress_pmd pmd;
|
||||||
@ -107,7 +107,7 @@ static const struct spdk_json_object_decoder rpc_compress_pmd_decoder[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_rpc_compress_set_pmd(struct spdk_jsonrpc_request *request,
|
rpc_compress_set_pmd(struct spdk_jsonrpc_request *request,
|
||||||
const struct spdk_json_val *params)
|
const struct spdk_json_val *params)
|
||||||
{
|
{
|
||||||
struct rpc_compress_set_pmd req;
|
struct rpc_compress_set_pmd req;
|
||||||
@ -141,7 +141,7 @@ spdk_rpc_compress_set_pmd(struct spdk_jsonrpc_request *request,
|
|||||||
spdk_jsonrpc_end_result(request, w);
|
spdk_jsonrpc_end_result(request, w);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
SPDK_RPC_REGISTER("compress_set_pmd", spdk_rpc_compress_set_pmd,
|
SPDK_RPC_REGISTER("compress_set_pmd", rpc_compress_set_pmd,
|
||||||
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
SPDK_RPC_STARTUP | SPDK_RPC_RUNTIME)
|
||||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(compress_set_pmd, set_compress_pmd)
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(compress_set_pmd, set_compress_pmd)
|
||||||
|
|
||||||
@ -169,7 +169,7 @@ static const struct spdk_json_object_decoder rpc_construct_compress_decoders[] =
|
|||||||
* device. Error status returned in the failed cases.
|
* device. Error status returned in the failed cases.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
spdk_rpc_bdev_compress_create(struct spdk_jsonrpc_request *request,
|
rpc_bdev_compress_create(struct spdk_jsonrpc_request *request,
|
||||||
const struct spdk_json_val *params)
|
const struct spdk_json_val *params)
|
||||||
{
|
{
|
||||||
struct rpc_construct_compress req = {NULL};
|
struct rpc_construct_compress req = {NULL};
|
||||||
@ -201,7 +201,7 @@ spdk_rpc_bdev_compress_create(struct spdk_jsonrpc_request *request,
|
|||||||
cleanup:
|
cleanup:
|
||||||
free_rpc_construct_compress(&req);
|
free_rpc_construct_compress(&req);
|
||||||
}
|
}
|
||||||
SPDK_RPC_REGISTER("bdev_compress_create", spdk_rpc_bdev_compress_create, SPDK_RPC_RUNTIME)
|
SPDK_RPC_REGISTER("bdev_compress_create", rpc_bdev_compress_create, SPDK_RPC_RUNTIME)
|
||||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_compress_create, construct_compress_bdev)
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_compress_create, construct_compress_bdev)
|
||||||
|
|
||||||
struct rpc_delete_compress {
|
struct rpc_delete_compress {
|
||||||
@ -219,7 +219,7 @@ static const struct spdk_json_object_decoder rpc_delete_compress_decoders[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_spdk_rpc_bdev_compress_delete_cb(void *cb_arg, int bdeverrno)
|
_rpc_bdev_compress_delete_cb(void *cb_arg, int bdeverrno)
|
||||||
{
|
{
|
||||||
struct spdk_jsonrpc_request *request = cb_arg;
|
struct spdk_jsonrpc_request *request = cb_arg;
|
||||||
struct spdk_json_write_ctx *w;
|
struct spdk_json_write_ctx *w;
|
||||||
@ -230,7 +230,7 @@ _spdk_rpc_bdev_compress_delete_cb(void *cb_arg, int bdeverrno)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_rpc_bdev_compress_delete(struct spdk_jsonrpc_request *request,
|
rpc_bdev_compress_delete(struct spdk_jsonrpc_request *request,
|
||||||
const struct spdk_json_val *params)
|
const struct spdk_json_val *params)
|
||||||
{
|
{
|
||||||
struct rpc_delete_compress req = {NULL};
|
struct rpc_delete_compress req = {NULL};
|
||||||
@ -241,10 +241,10 @@ spdk_rpc_bdev_compress_delete(struct spdk_jsonrpc_request *request,
|
|||||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INTERNAL_ERROR,
|
||||||
"spdk_json_decode_object failed");
|
"spdk_json_decode_object failed");
|
||||||
} else {
|
} else {
|
||||||
bdev_compress_delete(req.name, _spdk_rpc_bdev_compress_delete_cb, request);
|
bdev_compress_delete(req.name, _rpc_bdev_compress_delete_cb, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
free_rpc_delete_compress(&req);
|
free_rpc_delete_compress(&req);
|
||||||
}
|
}
|
||||||
SPDK_RPC_REGISTER("bdev_compress_delete", spdk_rpc_bdev_compress_delete, SPDK_RPC_RUNTIME)
|
SPDK_RPC_REGISTER("bdev_compress_delete", rpc_bdev_compress_delete, SPDK_RPC_RUNTIME)
|
||||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_compress_delete, delete_compress_bdev)
|
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(bdev_compress_delete, delete_compress_bdev)
|
||||||
|
Loading…
Reference in New Issue
Block a user