ocf_reqest: Store core handle instead of core_id

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2019-05-20 17:01:03 +02:00
parent eccd4a0163
commit 0490dd8bd4
26 changed files with 78 additions and 108 deletions

View File

@@ -237,8 +237,7 @@ void ocf_submit_cache_reqs(struct ocf_cache *cache,
uint32_t i;
int err;
cache_stats = &cache->core[req->core_id].
counters->cache_blocks;
cache_stats = &req->core->counters->cache_blocks;
if (reqs == 1) {
io = ocf_new_cache_io(cache);
@@ -328,7 +327,6 @@ update_stats:
void ocf_submit_volume_req(ocf_volume_t volume, struct ocf_request *req,
ocf_req_end_t callback)
{
struct ocf_cache *cache = req->cache;
struct ocf_counters_block *core_stats;
uint64_t flags = req->io ? req->io->flags : 0;
uint32_t class = req->io ? req->io->io_class : 0;
@@ -336,8 +334,7 @@ void ocf_submit_volume_req(ocf_volume_t volume, struct ocf_request *req,
struct ocf_io *io;
int err;
core_stats = &cache->core[req->core_id].
counters->core_blocks;
core_stats = &req->core->counters->core_blocks;
if (dir == OCF_WRITE)
env_atomic64_add(req->byte_length, &core_stats->write_bytes);
else if (dir == OCF_READ)