Introduce ocf_cache_is_passive()
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
parent
c662649f31
commit
f96451a698
@ -151,6 +151,16 @@ bool ocf_cache_is_device_attached(ocf_cache_t cache);
|
|||||||
*/
|
*/
|
||||||
bool ocf_cache_is_running(ocf_cache_t cache);
|
bool ocf_cache_is_running(ocf_cache_t cache);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Check if cache object is passive
|
||||||
|
*
|
||||||
|
* @param[in] cache Cache object
|
||||||
|
*
|
||||||
|
* @retval 1 Caching device is in passive state
|
||||||
|
* @retval 0 Caching device is not in passive state
|
||||||
|
*/
|
||||||
|
bool ocf_cache_is_passive(ocf_cache_t cache);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get cache mode of given cache object
|
* @brief Get cache mode of given cache object
|
||||||
*
|
*
|
||||||
|
@ -56,6 +56,12 @@ bool ocf_cache_is_running(ocf_cache_t cache)
|
|||||||
return env_bit_test(ocf_cache_state_running, &cache->cache_state);
|
return env_bit_test(ocf_cache_state_running, &cache->cache_state);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ocf_cache_is_passive(ocf_cache_t cache)
|
||||||
|
{
|
||||||
|
OCF_CHECK_NULL(cache);
|
||||||
|
return env_bit_test(ocf_cache_state_passive, &cache->cache_state);
|
||||||
|
}
|
||||||
|
|
||||||
bool ocf_cache_is_device_attached(ocf_cache_t cache)
|
bool ocf_cache_is_device_attached(ocf_cache_t cache)
|
||||||
{
|
{
|
||||||
OCF_CHECK_NULL(cache);
|
OCF_CHECK_NULL(cache);
|
||||||
|
Loading…
Reference in New Issue
Block a user