Merge pull request #654 from Open-CAS/fix-flapping-merge
Porting fix-flapping patches from v21.6.4 by arutk
This commit is contained in:
@@ -286,3 +286,10 @@ void ocf_engine_hndl_ops_req(struct ocf_request *req)
|
||||
|
||||
ocf_engine_push_req_back(req, true);
|
||||
}
|
||||
|
||||
bool ocf_req_cache_mode_has_lazy_write(ocf_req_cache_mode_t mode)
|
||||
{
|
||||
return ocf_cache_mode_is_valid((ocf_cache_mode_t)mode) &&
|
||||
ocf_mngt_cache_mode_has_lazy_write(
|
||||
(ocf_cache_mode_t)mode);
|
||||
}
|
||||
|
@@ -52,17 +52,7 @@ static inline const char *ocf_get_io_iface_name(ocf_cache_mode_t cache_mode)
|
||||
return iface ? iface->name : "Unknown";
|
||||
}
|
||||
|
||||
static inline bool ocf_cache_mode_is_valid(ocf_cache_mode_t mode)
|
||||
{
|
||||
return mode >= ocf_cache_mode_wt && mode < ocf_cache_mode_max;
|
||||
}
|
||||
|
||||
static inline bool ocf_req_cache_mode_has_lazy_write(ocf_req_cache_mode_t mode)
|
||||
{
|
||||
return ocf_cache_mode_is_valid((ocf_cache_mode_t)mode) &&
|
||||
ocf_mngt_cache_mode_has_lazy_write(
|
||||
(ocf_cache_mode_t)mode);
|
||||
}
|
||||
bool ocf_req_cache_mode_has_lazy_write(ocf_req_cache_mode_t mode);
|
||||
|
||||
bool ocf_fallback_pt_is_on(ocf_cache_t cache);
|
||||
|
||||
|
Reference in New Issue
Block a user