Fix seq_cutoff respecting in pt read

Signed-off-by: Michal Rakowski <michal.rakowski@intel.com>
This commit is contained in:
Michal Rakowski 2020-03-17 16:36:04 +01:00
parent 2edd05c812
commit 6f4d02f251
3 changed files with 5 additions and 4 deletions

View File

@ -245,6 +245,7 @@ void ocf_resolve_effective_cache_mode(ocf_cache_t cache,
if (ocf_seq_cutoff_check(core, req->rw, req->byte_position,
req->byte_length)) {
req->cache_mode = ocf_req_cache_mode_pt;
req->seq_cutoff = 1;
return;
}

View File

@ -120,7 +120,7 @@ int ocf_read_pt(struct ocf_request *req)
/* Traverse request to check if there are mapped cache lines */
ocf_engine_traverse(req);
if (req->info.seq_cutoff && ocf_engine_is_dirty_all(req)) {
if (req->seq_cutoff && ocf_engine_is_dirty_all(req)) {
use_cache = true;
} else {
if (ocf_engine_mapped_count(req)) {

View File

@ -26,9 +26,6 @@ struct ocf_req_info {
uint32_t seq_req : 1;
/*!< Sequential cache request flag. */
uint32_t seq_cutoff : 1;
/*!< Sequential cut off set for this request */
uint32_t flush_metadata : 1;
/*!< This bit tells if metadata flushing is required */
@ -188,6 +185,9 @@ struct ocf_request {
uint8_t master_io_req_type : 2;
/*!< Core device request context type */
uint8_t seq_cutoff : 1;
/*!< Sequential cut off set for this request */
log_sid_t sid;
/*!< Tracing sequence ID */