Remove exported object kobj

Simplify exported object lifecycle.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2022-09-16 22:38:10 +02:00
parent ad783917d0
commit 2f54aea87d
3 changed files with 69 additions and 124 deletions

View File

@@ -588,7 +588,7 @@ static int kcas_volume_destroy_exported_object(ocf_volume_t volume)
destroy_workqueue(bvol->expobj_wq);
cas_exp_obj_unlock(bvol->dsk);
cas_exp_obj_free(bvol->dsk);
cas_exp_obj_cleanup(bvol->dsk);
return 0;
@@ -759,11 +759,11 @@ static int kcas_core_stop_exported_object(ocf_core_t core, void *cntx)
return 0;
}
static int kcas_core_free_exported_object(ocf_core_t core, void *cntx)
static int kcas_core_cleanup_exported_object(ocf_core_t core, void *cntx)
{
struct bd_object *bvol = bd_object(ocf_core_get_volume(core));
cas_exp_obj_free(bvol->dsk);
cas_exp_obj_cleanup(bvol->dsk);
return 0;
}
@@ -783,7 +783,7 @@ int kcas_cache_destroy_all_core_exported_objects(ocf_cache_t cache)
}
ocf_core_visit(cache, kcas_core_stop_exported_object, NULL, true);
ocf_core_visit(cache, kcas_core_free_exported_object, NULL, true);
ocf_core_visit(cache, kcas_core_cleanup_exported_object, NULL, true);
return 0;
}