diff --git a/modules/cas_cache/volume/vol_block_dev_top.c b/modules/cas_cache/volume/vol_block_dev_top.c index e8d33b1..b391dc5 100644 --- a/modules/cas_cache/volume/vol_block_dev_top.c +++ b/modules/cas_cache/volume/vol_block_dev_top.c @@ -424,17 +424,6 @@ int block_dev_activate_exported_object(ocf_core_t core) return ret; } -static int _block_dev_activate_exported_object(ocf_core_t core, void *cntx) -{ - return block_dev_activate_exported_object(core); -} - -int block_dev_activate_all_exported_objects(ocf_cache_t cache) -{ - return ocf_core_visit(cache, _block_dev_activate_exported_object, NULL, - true); -} - static const char *get_cache_id_string(ocf_cache_t cache) { return ocf_cache_get_name(cache) + sizeof("cache") - 1; @@ -496,17 +485,6 @@ end: return result; } -static int _block_dev_create_exported_object_visitor(ocf_core_t core, void *cntx) -{ - return block_dev_create_exported_object(core); -} - -int block_dev_create_all_exported_objects(ocf_cache_t cache) -{ - return ocf_core_visit(cache, _block_dev_create_exported_object_visitor, NULL, - true); -} - int block_dev_destroy_exported_object(ocf_core_t core) { int ret = 0; @@ -594,6 +572,15 @@ static int _block_dev_stop_exported_object(ocf_core_t core, void *cntx) return 0; } +static int _block_dev_free_exported_object(ocf_core_t core, void *cntx) +{ + struct bd_object *bvol = bd_object( + ocf_core_get_volume(core)); + + casdisk_functions.casdsk_exp_obj_free(bvol->dsk); + return 0; +} + int block_dev_destroy_all_exported_objects(ocf_cache_t cache) { int result; @@ -610,21 +597,6 @@ int block_dev_destroy_all_exported_objects(ocf_cache_t cache) ocf_core_visit(cache, _block_dev_stop_exported_object, NULL, true); - block_dev_free_all_exported_objects(cache); - return 0; -} - -static int _block_dev_free_exported_object(ocf_core_t core, void *cntx) -{ - struct bd_object *bvol = bd_object( - ocf_core_get_volume(core)); - - casdisk_functions.casdsk_exp_obj_free(bvol->dsk); - return 0; -} - -int block_dev_free_all_exported_objects(ocf_cache_t cache) -{ return ocf_core_visit(cache, _block_dev_free_exported_object, NULL, true); } diff --git a/modules/cas_cache/volume/vol_block_dev_top.h b/modules/cas_cache/volume/vol_block_dev_top.h index c4fcc86..e16bb8f 100644 --- a/modules/cas_cache/volume/vol_block_dev_top.h +++ b/modules/cas_cache/volume/vol_block_dev_top.h @@ -6,15 +6,11 @@ #ifndef __VOL_BLOCK_DEV_TOP_H__ #define __VOL_BLOCK_DEV_TOP_H__ -int block_dev_activate_all_exported_objects(ocf_cache_t cache); int block_dev_activate_exported_object(ocf_core_t core); -int block_dev_create_all_exported_objects(ocf_cache_t cache); int block_dev_create_exported_object(ocf_core_t core); int block_dev_destroy_all_exported_objects(ocf_cache_t cache); int block_dev_destroy_exported_object(ocf_core_t core); -int block_dev_free_all_exported_objects(ocf_cache_t cache); - #endif /* __VOL_BLOCK_DEV_TOP_H__ */