Explicitly validate superblock after load
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com> Additional changes - load sb recovery CRC check Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
This commit is contained in:

committed by
Krzysztof Majzerowicz-Jaszcz

parent
90ff4afcda
commit
866bba72bf
@@ -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