Merge pull request #832 from rafalste/fix_debug_macros

Fix metadata debug macros
This commit is contained in:
Robert Baldyga 2024-09-20 13:59:34 +02:00 committed by GitHub
commit c7580a75d7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 7 additions and 6 deletions

View File

@ -321,7 +321,7 @@ static void metadata_io_io_end(struct metadata_io_request *m_req, int error)
metadata_io_req_drain(m_req); metadata_io_req_drain(m_req);
} }
OCF_DEBUG_PARAM(cache, "Page = %u", m_req->page); OCF_DEBUG_PARAM(m_req->cache, "Page = %u", m_req->page);
if (a_req->mio_conc) if (a_req->mio_conc)
ocf_mio_async_unlock(a_req->mio_conc, m_req); ocf_mio_async_unlock(a_req->mio_conc, m_req);

View File

@ -16,7 +16,7 @@
#if 1 == OCF_METADATA_RAW_DEBUG #if 1 == OCF_METADATA_RAW_DEBUG
#define OCF_DEBUG_TRACE(cache) \ #define OCF_DEBUG_TRACE(cache) \
ocf_cache_log(log_info, "[Metadata][Raw] %s\n", __func__) ocf_cache_log(cache, log_info, "[Metadata][Raw] %s\n", __func__)
#define OCF_DEBUG_MSG(cache, msg) \ #define OCF_DEBUG_MSG(cache, msg) \
ocf_cache_log(cache, log_info, "[Metadata][Raw] %s - %s\n", \ ocf_cache_log(cache, log_info, "[Metadata][Raw] %s - %s\n", \

View File

@ -1,5 +1,6 @@
/* /*
* Copyright(c) 2012-2022 Intel Corporation * Copyright(c) 2012-2022 Intel Corporation
* Copyright(c) 2024 Huawei Technologies
* SPDX-License-Identifier: BSD-3-Clause * SPDX-License-Identifier: BSD-3-Clause
*/ */
@ -50,7 +51,7 @@ static void _raw_atomic_io_discard_cmpl(struct _raw_atomic_flush_ctx *ctx,
ocf_metadata_error(ctx->req->cache); ocf_metadata_error(ctx->req->cache);
/* Call metadata flush completed call back */ /* Call metadata flush completed call back */
OCF_DEBUG_MSG(cache, "Asynchronous flushing complete"); OCF_DEBUG_MSG(ctx->req->cache, "Asynchronous flushing complete");
ctx->complete(ctx->req, ctx->req->error); ctx->complete(ctx->req, ctx->req->error);
@ -78,8 +79,8 @@ static int _raw_atomic_io_discard_do(struct ocf_cache *cache, void *context,
return req->error; return req->error;
} }
OCF_DEBUG_PARAM(cache, "Page to flushing = %u, count of pages = %u", OCF_DEBUG_PARAM(cache, "Page to flushing = %" ENV_PRIu64 ", count of pages = %u",
start_line, len); start_addr, len);
env_atomic_inc(&ctx->flush_req_cnt); env_atomic_inc(&ctx->flush_req_cnt);

View File

@ -16,7 +16,7 @@
#include "../ocf_def_priv.h" #include "../ocf_def_priv.h"
#include "../ocf_priv.h" #include "../ocf_priv.h"
#define OCF_METADATA_RAW_DEBUG 0 #define OCF_METADATA_RAW_DEBUG 0
#if 1 == OCF_METADATA_RAW_DEBUG #if 1 == OCF_METADATA_RAW_DEBUG
#define OCF_DEBUG_TRACE(cache) \ #define OCF_DEBUG_TRACE(cache) \