Fix metadata debug macros

Signed-off-by: Rafal Stefanowski <rafal.stefanowski@huawei.com>
This commit is contained in:
Rafal Stefanowski 2024-09-18 10:22:21 +02:00
parent b3f5ca1c2f
commit c1dc688fb5
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);
}
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)
ocf_mio_async_unlock(a_req->mio_conc, m_req);

View File

@ -16,7 +16,7 @@
#if 1 == OCF_METADATA_RAW_DEBUG
#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) \
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) 2024 Huawei Technologies
* 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);
/* 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);
@ -78,8 +79,8 @@ static int _raw_atomic_io_discard_do(struct ocf_cache *cache, void *context,
return req->error;
}
OCF_DEBUG_PARAM(cache, "Page to flushing = %u, count of pages = %u",
start_line, len);
OCF_DEBUG_PARAM(cache, "Page to flushing = %" ENV_PRIu64 ", count of pages = %u",
start_addr, len);
env_atomic_inc(&ctx->flush_req_cnt);

View File

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