Unify core naming convention (core_obj -> core)
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -59,7 +59,7 @@ static void _ocf_backfill_do_io(struct ocf_request *req, int error)
|
||||
req->data = NULL;
|
||||
|
||||
if (req->error) {
|
||||
env_atomic_inc(&cache->core_obj[req->core_id].
|
||||
env_atomic_inc(&cache->core[req->core_id].
|
||||
counters->cache_errors.write);
|
||||
ocf_engine_invalidate(req);
|
||||
} else {
|
||||
|
@@ -24,7 +24,7 @@ void ocf_engine_error(struct ocf_request *req,
|
||||
if (stop_cache)
|
||||
env_bit_clear(ocf_cache_state_running, &cache->cache_state);
|
||||
|
||||
ocf_core_log(&cache->core_obj[req->core_id], log_err,
|
||||
ocf_core_log(&cache->core[req->core_id], log_err,
|
||||
"%s sector: %" ENV_PRIu64 ", bytes: %u\n", msg,
|
||||
BYTES_TO_SECTORS(req->byte_position), req->byte_length);
|
||||
}
|
||||
@@ -446,7 +446,7 @@ void ocf_engine_update_block_stats(struct ocf_request *req)
|
||||
ocf_part_id_t part_id = req->part_id;
|
||||
struct ocf_counters_block *blocks;
|
||||
|
||||
blocks = &cache->core_obj[core_id].counters->
|
||||
blocks = &cache->core[core_id].counters->
|
||||
part_counters[part_id].blocks;
|
||||
|
||||
if (req->rw == OCF_READ)
|
||||
@@ -466,11 +466,11 @@ void ocf_engine_update_request_stats(struct ocf_request *req)
|
||||
|
||||
switch (req->rw) {
|
||||
case OCF_READ:
|
||||
reqs = &cache->core_obj[core_id].counters->
|
||||
reqs = &cache->core[core_id].counters->
|
||||
part_counters[part_id].read_reqs;
|
||||
break;
|
||||
case OCF_WRITE:
|
||||
reqs = &cache->core_obj[core_id].counters->
|
||||
reqs = &cache->core[core_id].counters->
|
||||
part_counters[part_id].write_reqs;
|
||||
break;
|
||||
default:
|
||||
|
@@ -16,7 +16,7 @@
|
||||
|
||||
static void _ocf_d2c_completion(struct ocf_request *req, int error)
|
||||
{
|
||||
ocf_core_t core = &req->cache->core_obj[req->core_id];
|
||||
ocf_core_t core = &req->cache->core[req->core_id];
|
||||
req->error = error;
|
||||
|
||||
OCF_DEBUG_RQ(req, "Completion");
|
||||
@@ -39,7 +39,7 @@ static void _ocf_d2c_completion(struct ocf_request *req, int error)
|
||||
int ocf_io_d2c(struct ocf_request *req)
|
||||
{
|
||||
ocf_cache_t cache = req->cache;
|
||||
ocf_core_t core = &cache->core_obj[req->core_id];
|
||||
ocf_core_t core = &cache->core[req->core_id];
|
||||
|
||||
OCF_DEBUG_TRACE(req->cache);
|
||||
|
||||
|
@@ -63,7 +63,7 @@ static int _ocf_discard_core(struct ocf_request *req)
|
||||
struct ocf_cache *cache = req->cache;
|
||||
struct ocf_io *io;
|
||||
|
||||
io = ocf_dobj_new_io(&cache->core_obj[req->core_id].obj);
|
||||
io = ocf_dobj_new_io(&cache->core[req->core_id].obj);
|
||||
if (!io) {
|
||||
_ocf_discard_complete_req(req, -ENOMEM);
|
||||
return -ENOMEM;
|
||||
|
@@ -43,7 +43,7 @@ static void _ocf_read_fast_io(struct ocf_request *req, int error)
|
||||
if (req->error) {
|
||||
OCF_DEBUG_RQ(req, "ERROR");
|
||||
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
cache_errors.read);
|
||||
ocf_engine_push_req_front_pt(req);
|
||||
} else {
|
||||
|
@@ -20,7 +20,7 @@ static void _ocf_invalidate_req(struct ocf_request *req, int error)
|
||||
{
|
||||
if (error) {
|
||||
req->error = error;
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
cache_errors.write);
|
||||
}
|
||||
|
||||
|
@@ -48,7 +48,7 @@ int ocf_engine_ops(struct ocf_request *req)
|
||||
env_atomic_set(&req->req_remaining, 2);
|
||||
|
||||
/* Submit operation into core device */
|
||||
ocf_submit_obj_req(&cache->core_obj[req->core_id].obj, req,
|
||||
ocf_submit_obj_req(&cache->core[req->core_id].obj, req,
|
||||
_ocf_engine_ops_io);
|
||||
|
||||
ocf_submit_cache_reqs(cache, req->map, req, req->rw,
|
||||
|
@@ -28,7 +28,7 @@ static void _ocf_read_pt_io(struct ocf_request *req, int error)
|
||||
|
||||
if (req->error) {
|
||||
req->info.core_error = 1;
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
core_errors.read);
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ static inline void _ocf_read_pt_submit(struct ocf_request *req)
|
||||
OCF_DEBUG_RQ(req, "Submit");
|
||||
|
||||
/* Core read */
|
||||
ocf_submit_obj_req(&cache->core_obj[req->core_id].obj, req,
|
||||
ocf_submit_obj_req(&cache->core[req->core_id].obj, req,
|
||||
_ocf_read_pt_io);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ int ocf_read_pt_do(struct ocf_request *req)
|
||||
|
||||
/* Update statistics */
|
||||
ocf_engine_update_block_stats(req);
|
||||
env_atomic64_inc(&cache->core_obj[req->core_id].counters->
|
||||
env_atomic64_inc(&cache->core[req->core_id].counters->
|
||||
part_counters[req->part_id].read_reqs.pass_through);
|
||||
|
||||
/* Put OCF request - decrease reference counter */
|
||||
|
@@ -38,7 +38,7 @@ static void _ocf_read_generic_hit_io(struct ocf_request *req, int error)
|
||||
OCF_DEBUG_RQ(req, "HIT completion");
|
||||
|
||||
if (req->error) {
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].
|
||||
env_atomic_inc(&req->cache->core[req->core_id].
|
||||
counters->cache_errors.read);
|
||||
ocf_engine_push_req_front_pt(req);
|
||||
} else {
|
||||
@@ -78,7 +78,7 @@ static void _ocf_read_generic_miss_io(struct ocf_request *req, int error)
|
||||
req->complete(req, req->error);
|
||||
|
||||
req->info.core_error = 1;
|
||||
env_atomic_inc(&cache->core_obj[req->core_id].
|
||||
env_atomic_inc(&cache->core[req->core_id].
|
||||
counters->core_errors.read);
|
||||
|
||||
ctx_data_free(cache->owner, req->cp_data);
|
||||
@@ -128,7 +128,7 @@ static inline void _ocf_read_generic_submit_miss(struct ocf_request *req)
|
||||
goto err_alloc;
|
||||
|
||||
/* Submit read request to core device. */
|
||||
ocf_submit_obj_req(&cache->core_obj[req->core_id].obj, req,
|
||||
ocf_submit_obj_req(&cache->core[req->core_id].obj, req,
|
||||
_ocf_read_generic_miss_io);
|
||||
|
||||
return;
|
||||
|
@@ -24,7 +24,7 @@ static void _ocf_read_wa_io(struct ocf_request *req, int error)
|
||||
|
||||
if (req->error) {
|
||||
req->info.core_error = 1;
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
core_errors.write);
|
||||
}
|
||||
|
||||
@@ -72,12 +72,12 @@ int ocf_write_wa(struct ocf_request *req)
|
||||
|
||||
/* Submit write IO to the core */
|
||||
env_atomic_set(&req->req_remaining, 1);
|
||||
ocf_submit_obj_req(&cache->core_obj[req->core_id].obj, req,
|
||||
ocf_submit_obj_req(&cache->core[req->core_id].obj, req,
|
||||
_ocf_read_wa_io);
|
||||
|
||||
/* Update statistics */
|
||||
ocf_engine_update_block_stats(req);
|
||||
env_atomic64_inc(&cache->core_obj[req->core_id].counters->
|
||||
env_atomic64_inc(&cache->core[req->core_id].counters->
|
||||
part_counters[req->part_id].write_reqs.pass_through);
|
||||
}
|
||||
|
||||
|
@@ -88,7 +88,7 @@ static const struct ocf_io_if _io_if_wb_flush_metadata = {
|
||||
static void _ocf_write_wb_io(struct ocf_request *req, int error)
|
||||
{
|
||||
if (error) {
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
cache_errors.write);
|
||||
req->error |= error;
|
||||
}
|
||||
|
@@ -26,7 +26,7 @@ static const struct ocf_io_if _io_if_wi_flush_metadata = {
|
||||
static void _ocf_write_wi_io_flush_metadata(struct ocf_request *req, int error)
|
||||
{
|
||||
if (error) {
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
cache_errors.write);
|
||||
req->error |= error;
|
||||
}
|
||||
@@ -78,7 +78,7 @@ static void _ocf_write_wi_core_io(struct ocf_request *req, int error)
|
||||
if (error) {
|
||||
req->error = error;
|
||||
req->info.core_error = 1;
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
core_errors.write);
|
||||
}
|
||||
|
||||
@@ -111,12 +111,12 @@ static int _ocf_write_wi_do(struct ocf_request *req)
|
||||
OCF_DEBUG_RQ(req, "Submit");
|
||||
|
||||
/* Submit write IO to the core */
|
||||
ocf_submit_obj_req(&cache->core_obj[req->core_id].obj, req,
|
||||
ocf_submit_obj_req(&cache->core[req->core_id].obj, req,
|
||||
_ocf_write_wi_core_io);
|
||||
|
||||
/* Update statistics */
|
||||
ocf_engine_update_block_stats(req);
|
||||
env_atomic64_inc(&cache->core_obj[req->core_id].counters->
|
||||
env_atomic64_inc(&cache->core[req->core_id].counters->
|
||||
part_counters[req->part_id].write_reqs.pass_through);
|
||||
|
||||
/* Put OCF request - decrease reference counter */
|
||||
|
@@ -48,7 +48,7 @@ static void _ocf_write_wt_cache_io(struct ocf_request *req, int error)
|
||||
{
|
||||
if (error) {
|
||||
req->error = req->error ?: error;
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
cache_errors.write);
|
||||
|
||||
if (req->error)
|
||||
@@ -63,7 +63,7 @@ static void _ocf_write_wt_core_io(struct ocf_request *req, int error)
|
||||
if (error) {
|
||||
req->error = error;
|
||||
req->info.core_error = 1;
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
core_errors.write);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ static inline void _ocf_write_wt_submit(struct ocf_request *req)
|
||||
ocf_engine_io_count(req), _ocf_write_wt_cache_io);
|
||||
|
||||
/* To core */
|
||||
ocf_submit_obj_req(&cache->core_obj[req->core_id].obj, req,
|
||||
ocf_submit_obj_req(&cache->core[req->core_id].obj, req,
|
||||
_ocf_write_wt_core_io);
|
||||
}
|
||||
|
||||
|
@@ -50,7 +50,7 @@ static const struct ocf_io_if _io_if_zero_purge = {
|
||||
static void _ocf_zero_io_flush_metadata(struct ocf_request *req, int error)
|
||||
{
|
||||
if (error) {
|
||||
env_atomic_inc(&req->cache->core_obj[req->core_id].counters->
|
||||
env_atomic_inc(&req->cache->core[req->core_id].counters->
|
||||
cache_errors.write);
|
||||
req->error = error;
|
||||
}
|
||||
|
Reference in New Issue
Block a user