log: rename log flag literal to align with SPDK_LOG_* scheme
Couple log flags did not follow previous scheme of naming so rename it. This will simplify next patch that replaces all the literals with names provided for the flags. Avoiding accidental changes in log flag names. SPDK_NOTIFY_RPC -> SPDK_LOG_NOTIFY_RPC SPDK_LOG_CRYPTO -> SPDK_LOG_VBDEV_CRYPTO SPDK_TRACE_VBDEV_OCF_VOLUME -> SPDK_LOG_VBDEV_OCF_VOLUME SPDK_LOG_JSON -> SPDK_LOG_JSON_UTIL Signed-off-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Change-Id: I00cb0a7994d8aaf28b03828b93b1dbb18215089f Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4498 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Mellanox Build Bot Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
cafc1994ee
commit
e19b294a22
@ -36,7 +36,7 @@
|
||||
#include "spdk_internal/utf.h"
|
||||
#include "spdk_internal/log.h"
|
||||
|
||||
#define SPDK_JSON_DEBUG(...) SPDK_DEBUGLOG(SPDK_LOG_JSON, __VA_ARGS__)
|
||||
#define SPDK_JSON_DEBUG(...) SPDK_DEBUGLOG(SPDK_LOG_JSON_UTIL, __VA_ARGS__)
|
||||
|
||||
size_t
|
||||
spdk_json_val_len(const struct spdk_json_val *val)
|
||||
@ -664,4 +664,4 @@ spdk_json_next(struct spdk_json_val *it)
|
||||
}
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("json_util", SPDK_LOG_JSON)
|
||||
SPDK_LOG_REGISTER_COMPONENT("json_util", SPDK_LOG_JSON_UTIL)
|
||||
|
@ -104,7 +104,7 @@ rpc_notify_get_notifications(struct spdk_jsonrpc_request *request,
|
||||
if (params &&
|
||||
spdk_json_decode_object(params, rpc_notify_get_notifications_decoders,
|
||||
SPDK_COUNTOF(rpc_notify_get_notifications_decoders), &req)) {
|
||||
SPDK_DEBUGLOG(SPDK_NOTIFY_RPC, "spdk_json_decode_object failed\n");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_NOTIFY_RPC, "spdk_json_decode_object failed\n");
|
||||
|
||||
spdk_jsonrpc_send_error_response(request, SPDK_JSONRPC_ERROR_INVALID_PARAMS,
|
||||
spdk_strerror(EINVAL));
|
||||
@ -123,4 +123,4 @@ rpc_notify_get_notifications(struct spdk_jsonrpc_request *request,
|
||||
SPDK_RPC_REGISTER("notify_get_notifications", rpc_notify_get_notifications, SPDK_RPC_RUNTIME)
|
||||
SPDK_RPC_REGISTER_ALIAS_DEPRECATED(notify_get_notifications, get_notifications)
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("notify_rpc", SPDK_NOTIFY_RPC)
|
||||
SPDK_LOG_REGISTER_COMPONENT("notify_rpc", SPDK_LOG_NOTIFY_RPC)
|
||||
|
@ -1066,7 +1066,7 @@ crypto_read_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io,
|
||||
bdev_io);
|
||||
if (rc != 0) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_CRYPTO, "No memory, queue the IO.\n");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "No memory, queue the IO.\n");
|
||||
io_ctx->ch = ch;
|
||||
vbdev_crypto_queue_io(bdev_io);
|
||||
} else {
|
||||
@ -1091,7 +1091,7 @@ crypto_write_get_buf_cb(struct spdk_io_channel *ch, struct spdk_bdev_io *bdev_io
|
||||
if (rc != 0) {
|
||||
spdk_bdev_io_put_aux_buf(bdev_io, aux_buf);
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_CRYPTO, "No memory, queue the IO.\n");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "No memory, queue the IO.\n");
|
||||
io_ctx->ch = ch;
|
||||
vbdev_crypto_queue_io(bdev_io);
|
||||
} else {
|
||||
@ -1159,7 +1159,7 @@ vbdev_crypto_submit_request(struct spdk_io_channel *ch, struct spdk_bdev_io *bde
|
||||
|
||||
if (rc != 0) {
|
||||
if (rc == -ENOMEM) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_CRYPTO, "No memory, queue the IO.\n");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "No memory, queue the IO.\n");
|
||||
io_ctx->ch = ch;
|
||||
vbdev_crypto_queue_io(bdev_io);
|
||||
} else {
|
||||
@ -1765,7 +1765,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev)
|
||||
int rc = 0;
|
||||
|
||||
if (g_number_of_claimed_volumes >= MAX_CRYPTO_VOLUMES) {
|
||||
SPDK_DEBUGLOG(SPDK_LOG_CRYPTO, "Reached max number of claimed volumes\n");
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "Reached max number of claimed volumes\n");
|
||||
rc = -EINVAL;
|
||||
goto error_vbdev_alloc;
|
||||
}
|
||||
@ -1778,7 +1778,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev)
|
||||
if (strcmp(name->bdev_name, bdev->name) != 0) {
|
||||
continue;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_CRYPTO, "Match on %s\n", bdev->name);
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "Match on %s\n", bdev->name);
|
||||
|
||||
vbdev = calloc(1, sizeof(struct vbdev_crypto));
|
||||
if (!vbdev) {
|
||||
@ -1954,7 +1954,7 @@ vbdev_crypto_claim(struct spdk_bdev *bdev)
|
||||
rc = -EINVAL;
|
||||
goto error_bdev_register;
|
||||
}
|
||||
SPDK_DEBUGLOG(SPDK_LOG_CRYPTO, "registered io_device and virtual bdev for: %s\n",
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_CRYPTO, "registered io_device and virtual bdev for: %s\n",
|
||||
name->vbdev_name);
|
||||
break;
|
||||
}
|
||||
@ -2037,4 +2037,4 @@ vbdev_crypto_examine(struct spdk_bdev *bdev)
|
||||
spdk_bdev_module_examine_done(&crypto_if);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_crypto", SPDK_LOG_CRYPTO)
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_crypto", SPDK_LOG_VBDEV_CRYPTO)
|
||||
|
@ -182,7 +182,7 @@ vbdev_ocf_volume_submit_io_cb(struct spdk_bdev_io *bdev_io, bool success, void *
|
||||
}
|
||||
|
||||
if (io_ctx->error) {
|
||||
SPDK_DEBUGLOG(SPDK_TRACE_VBDEV_OCF_VOLUME,
|
||||
SPDK_DEBUGLOG(SPDK_LOG_VBDEV_OCF_VOLUME,
|
||||
"base returned error on io submission: %d\n", io_ctx->error);
|
||||
}
|
||||
|
||||
@ -441,4 +441,4 @@ vbdev_ocf_volume_cleanup(void)
|
||||
ocf_ctx_unregister_volume_type(vbdev_ocf_ctx, SPDK_OBJECT);
|
||||
}
|
||||
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_ocf_volume", SPDK_TRACE_VBDEV_OCF_VOLUME)
|
||||
SPDK_LOG_REGISTER_COMPONENT("vbdev_ocf_volume", SPDK_LOG_VBDEV_OCF_VOLUME)
|
||||
|
Loading…
Reference in New Issue
Block a user