Queue settle is a mechanism to wait for all OCF processing
on a given queue to finish.
In some tests simply waiting for I/O to finish is not enough. Most
notably some statistics are potentially incremented after user triggered
I/O is finished. This is due to asynchronous nature of I/O operations
and OCF approach to statistics update, where only eventual consistency
is guaranteed without explicit mechanism available to query whether
the final state is reached yet. However it is fully in the adapter power
to determine this, as OCF executes in context of API calls from the
adapter (like I/O submission, ocf_queue_run, ocf_cleaner_run, management
operations) and I/O completion callbacks. Queue settle is a mechanism to
assure ocf_queue_run is not being executed by the thread associated with
a queue.
With queue settle mechanism it is straightforward for the adapter to
wait for cache statistics to reach fixed values:
1. wait for all I/O to OCF to finish
2. settle all I/O queues
3. make sure background cleaner is not active
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
rio stands for Rigid IO tester and is a simple mechanism for testing
OCF cache IO.
Signed-off-by: Jan Musial <jan.musial@intel.com>
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
With atomic superblock commit during cache attach, it is possible
that power failure interrupts attach operation at a point where
neither new or old superblock is present - right after the superblock
is cleared.
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
... this is useful to workaround current pyocf limitations and
load cache with manual core insertion
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
Adding option to
1. inject error based on I/O number
2. arm/disarm error injection for easier testing
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
As amount of fixed size metadata allocated by OCF grows, we need to adjust
test to not try to start cache on device that is too small.
Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
Error for an invalid cache operation while in passive mode added
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Error name correction
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
API changes for passive cache mode
Moved the passive cache error return source to the api for flush and
set_param
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Further API changes for passive cache mode
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>
Passive api - review changes
Signed-off-by: Krzysztof Majzerowicz-Jaszcz <krzysztof.majzerowicz-jaszcz@intel.com>