Modify ocf_mngt_get_ram_needed to never fail

Signed-off-by: Amir Haroush <amir.haroush@huawei.com>
Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
Amir Haroush
2023-06-20 16:33:11 +03:00
committed by Robert Baldyga
parent 01902e1206
commit ed62866324
2 changed files with 7 additions and 21 deletions

View File

@@ -458,14 +458,12 @@ static inline void ocf_mngt_cache_attach_config_set_default(
* @brief Get amount of free RAM needed to attach cache volume
*
* @param[in] cache Cache handle
* @param[in] cfg Caching device configuration
* @param[out] ram_needed Amount of RAM needed in bytes
* @param[in] volume_size Volume size in bytes
*
* @retval 0 Success
* @retval Non-zero Error occurred
* @retval Amount of RAM needed in bytes
*/
int ocf_mngt_get_ram_needed(ocf_cache_t cache,
struct ocf_mngt_cache_device_config *cfg, uint64_t *ram_needed);
uint64_t ocf_mngt_get_ram_needed(ocf_cache_t cache,
uint64_t volume_size);
/**
* @brief Completion callback of cache attach operation