Fix race condition during cache attach
After attaching new cache device handle all the IOs in Pass-Through mode until all the d2c requests are completed. Signed-off-by: Robert Baldyga <robert.baldyga@huawei.com>
This commit is contained in:
@@ -162,6 +162,11 @@ void ocf_resolve_effective_cache_mode(ocf_cache_t cache,
|
||||
return;
|
||||
}
|
||||
|
||||
if (env_atomic_read(&cache->attach_pt)) {
|
||||
req->cache_mode = ocf_req_cache_mode_pt;
|
||||
return;
|
||||
}
|
||||
|
||||
if (cache->pt_unaligned_io && !ocf_req_is_4k(req->addr, req->bytes)) {
|
||||
req->cache_mode = ocf_req_cache_mode_pt;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user