Skip to content

Commit a538501

Browse files
Merge pull request #920 from robertbaldyga/logs-and-typos-20260211
Add logs and fix typos
2 parents ba3d618 + 32280b8 commit a538501

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

src/engine/engine_wb.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright(c) 2012-2021 Intel Corporation
3+
* Copyright(c) 2026 Unvertical
34
* SPDX-License-Identifier: BSD-3-Clause
45
*/
56
#ifndef ENGINE_WB_H_
@@ -9,4 +10,4 @@ int ocf_write_wb(struct ocf_request *req);
910

1011
int ocf_write_wb_do(struct ocf_request *req);
1112

12-
#endif /* ENGINE_WI_H_ */
13+
#endif /* ENGINE_WB_H_ */

src/ocf_seq_cutoff.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright(c) 2020-2021 Intel Corporation
33
* Copyright(c) 2024 Huawei Technologies
4+
* Copyright(c) 2026 Unvertical
45
* SPDX-License-Identifier: BSD-3-Clause
56
*/
67

@@ -100,7 +101,7 @@ static void ocf_seq_cutoff_base_deinit(struct ocf_seq_cutoff *base)
100101

101102
int ocf_core_seq_cutoff_init(ocf_core_t core)
102103
{
103-
ocf_core_log(core, log_info, "Seqential cutoff init\n");
104+
ocf_core_log(core, log_info, "Sequential cutoff init\n");
104105

105106
core->seq_cutoff = env_vmalloc(sizeof(struct ocf_seq_cutoff_percore));
106107
if (!core->seq_cutoff)

src/utils/utils_alock.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/*
22
* Copyright(c) 2012-2022 Intel Corporation
33
* Copyright(c) 2024 Huawei Technologies
4+
* Copyright(c) 2026 Unvertical
45
* SPDX-License-Identifier: BSD-3-Clause
56
*/
67

@@ -96,6 +97,7 @@ int ocf_alock_init_inplace(struct ocf_alock *self, unsigned num_entries,
9697
{
9798
uint32_t i;
9899
int error = 0;
100+
uint64_t size = num_entries * sizeof(self->access[0]);
99101

100102
OCF_DEBUG_TRACE(cache);
101103

@@ -109,8 +111,10 @@ int ocf_alock_init_inplace(struct ocf_alock *self, unsigned num_entries,
109111
goto rwsem_err;
110112
}
111113

112-
self->access = env_vzalloc(num_entries * sizeof(self->access[0]));
114+
ocf_cache_log(cache, log_info, "Metadata access size: %llu kiB\n",
115+
OCF_DIV_ROUND_UP(size, KiB));
113116

117+
self->access = env_vzalloc(size);
114118
if (!self->access) {
115119
error = __LINE__;
116120
goto allocation_err;
@@ -161,6 +165,9 @@ int ocf_alock_init(struct ocf_alock **self, unsigned num_entries,
161165

162166
OCF_DEBUG_TRACE(cache);
163167

168+
ocf_cache_log(cache, log_info, "Metadata alock size: %llu kiB\n",
169+
OCF_DIV_ROUND_UP((uint64_t)sizeof(*alock), KiB));
170+
164171
alock = env_vzalloc(sizeof(*alock));
165172
if (!alock)
166173
return -OCF_ERR_NO_MEM;

0 commit comments

Comments
 (0)