Two pass write invalidate

Add second pass of write invalidate. It is necessary only
if concurrent I/O had inserted target LBAs to cache after
WI request did traversation. These LBAs might have been
written by WI request behind the concurrent I/O's back,
resulting in making these sectors effectively invalid.
In this case we must update these sectors' metadata to
reflect this. However we won't know about this after we
traverse the request again - hence calling ocf_write_wi
again with req->wi_second_pass set to indicate that this
is the second pass (core write should be skipped).

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2020-07-16 21:47:48 +02:00
parent 13828ab836
commit 91b6098fda
2 changed files with 68 additions and 21 deletions

View File

@@ -188,6 +188,9 @@ struct ocf_request {
uint8_t seq_cutoff : 1;
/*!< Sequential cut off set for this request */
uint8_t wi_second_pass : 1;
/*!< Set after first pass of WI write is completed */
log_sid_t sid;
/*!< Tracing sequence ID */