Merge exp obj create/activate
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
@@ -601,19 +601,6 @@ err:
|
||||
/**
|
||||
* @brief this routine actually adds /dev/casM-N inode
|
||||
*/
|
||||
static int kcas_volume_activate_exported_object(ocf_volume_t volume,
|
||||
struct cas_exp_obj_ops *ops)
|
||||
{
|
||||
struct bd_object *bvol = bd_object(volume);
|
||||
int result;
|
||||
|
||||
result = cas_exp_obj_activate(bvol->dsk);
|
||||
if (result == -EEXIST)
|
||||
result = -KCAS_ERR_FILE_EXISTS;
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int kcas_core_create_exported_object(ocf_core_t core)
|
||||
{
|
||||
ocf_cache_t cache = ocf_core_get_cache(core);
|
||||
@@ -638,23 +625,6 @@ int kcas_core_destroy_exported_object(ocf_core_t core)
|
||||
return kcas_volume_destroy_exported_object(volume);
|
||||
}
|
||||
|
||||
int kcas_core_activate_exported_object(ocf_core_t core)
|
||||
{
|
||||
ocf_cache_t cache = ocf_core_get_cache(core);
|
||||
ocf_volume_t volume = ocf_core_get_volume(core);
|
||||
int result;
|
||||
|
||||
result = kcas_volume_activate_exported_object(volume,
|
||||
&kcas_core_exp_obj_ops);
|
||||
if (result) {
|
||||
printk(KERN_ERR "Cannot activate exported object, %s.%s. "
|
||||
"Error code %d\n", ocf_cache_get_name(cache),
|
||||
ocf_core_get_name(core), result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
int kcas_cache_create_exported_object(ocf_cache_t cache)
|
||||
{
|
||||
ocf_volume_t volume = ocf_cache_get_volume(cache);
|
||||
@@ -677,22 +647,6 @@ int kcas_cache_destroy_exported_object(ocf_cache_t cache)
|
||||
return kcas_volume_destroy_exported_object(volume);
|
||||
}
|
||||
|
||||
int kcas_cache_activate_exported_object(ocf_cache_t cache)
|
||||
{
|
||||
ocf_volume_t volume = ocf_cache_get_volume(cache);
|
||||
int result;
|
||||
|
||||
result = kcas_volume_activate_exported_object(volume,
|
||||
&kcas_cache_exp_obj_ops);
|
||||
if (result) {
|
||||
printk(KERN_ERR "Cannot activate cache %s exported object. "
|
||||
"Error code %d\n", ocf_cache_get_name(cache),
|
||||
result);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static int kcas_core_lock_exported_object(ocf_core_t core, void *cntx)
|
||||
{
|
||||
int result;
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright(c) 2012-2021 Intel Corporation
|
||||
* Copyright(c) 2012-2022 Intel Corporation
|
||||
* SPDX-License-Identifier: BSD-3-Clause
|
||||
*/
|
||||
|
||||
@@ -9,12 +9,10 @@
|
||||
|
||||
int kcas_core_create_exported_object(ocf_core_t core);
|
||||
int kcas_core_destroy_exported_object(ocf_core_t core);
|
||||
int kcas_core_activate_exported_object(ocf_core_t core);
|
||||
|
||||
int kcas_cache_destroy_all_core_exported_objects(ocf_cache_t cache);
|
||||
|
||||
int kcas_cache_create_exported_object(ocf_cache_t cache);
|
||||
int kcas_cache_destroy_exported_object(ocf_cache_t cache);
|
||||
int kcas_cache_activate_exported_object(ocf_cache_t cache);
|
||||
|
||||
#endif /* __VOL_BLOCK_DEV_TOP_H__ */
|
||||
|
Reference in New Issue
Block a user