Extend CAS interface with Write-only cache mode

Write-only (WO) cache mode is similar to Write-back (WB), however
read operations do not promote data to cache. Reads are mostly
serviced by the core device, only dirty sectors are fetched from
the cache.

Write-only cache mode is behaving similarly to Write-back with
respect to flushing dirty data. For example it is required to
explicitly enable/disable flushing when changing cache mode
from WO to something other than WB.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski
2019-06-07 15:10:11 -04:00
parent a9eb0ee705
commit ffa1f4b067
7 changed files with 31 additions and 18 deletions

View File

@@ -261,7 +261,7 @@ class cas_config(object):
format(self.device))
def check_cache_mode_valid(self, cache_mode):
if cache_mode.lower() not in ['wt', 'pt', 'wa', 'wb']:
if cache_mode.lower() not in ['wt', 'pt', 'wa', 'wb', 'wo']:
raise ValueError('Invalid cache mode {0}'.format(cache_mode))
def check_cleaning_policy_valid(self, cleaning_policy):