Core data object

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2019-01-04 08:33:34 +01:00
parent 1b0b2597d3
commit 4be6761a18
23 changed files with 769 additions and 543 deletions

View File

@@ -577,7 +577,7 @@ static int ocf_metadata_hash_init_variable_size(struct ocf_cache *cache,
if (cache->device->init_mode == ocf_init_mode_metadata_volatile) {
raw->raw_type = metadata_raw_type_volatile;
} else if (i == metadata_segment_collision &&
ocf_data_obj_is_atomic(&cache->device->obj)) {
ocf_dobj_is_atomic(&cache->device->obj)) {
raw->raw_type = metadata_raw_type_atomic;
}
@@ -975,7 +975,7 @@ static int ocf_metadata_hash_load_superblock(struct ocf_cache *cache)
uuid.size = muuid->size;
/* Initialize core data object */
ocf_data_obj_init(&cache->core[i].obj,
ocf_dobj_init(&cache->core[i].obj,
ocf_ctx_get_data_obj_type(cache->owner,
cache->core_conf_meta[i].type),
&uuid, false);
@@ -1544,7 +1544,7 @@ static int ocf_metadata_hash_load_recovery(struct ocf_cache *cache)
OCF_DEBUG_TRACE(cache);
if (ocf_data_obj_is_atomic(&cache->device->obj)) {
if (ocf_dobj_is_atomic(&cache->device->obj)) {
result = _ocf_metadata_hash_load_recovery_atomic(cache);
rebuild_dirty_only = false;
} else {

View File

@@ -46,7 +46,7 @@ static struct ocf_io_if meta_restart_if = {
*/
static uint32_t metadata_io_max_page(struct ocf_cache *cache)
{
return ocf_data_obj_get_max_io_size(&cache->device->obj) /
return ocf_dobj_get_max_io_size(&cache->device->obj) /
BYTES_TO_SECTORS(PAGE_SIZE);
}
@@ -57,7 +57,7 @@ static void metadata_io_read_i_atomic_end(struct ocf_io *io, int error)
{
struct metadata_io_request_atomic *meta_atom_req = io->priv1;
OCF_DEBUG_TRACE(ocf_data_obj_get_cache(io->obj));
OCF_DEBUG_TRACE(ocf_dobj_get_cache(io->obj));
meta_atom_req->error |= error;
env_completion_complete(&meta_atom_req->complete);